Skip to content

chore: Deploy internally accessible godoc container #1415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 13, 2022

Conversation

dwahler
Copy link
Contributor

@dwahler dwahler commented May 12, 2022

Build a container image that runs godoc on our source code, and deploy it to Cloud Run for internal use.

The Cloud Run/Build configurations are currently manually configured, but the important settings are:

  • Cloud Build config path: /scripts/internal-docs/cloudbuild.yaml
  • Container image: gcr.io/coder-devrel/internal-docs
  • Port: 6060
  • Container resources: 2 vCPU, 2GB RAM
  • Execution environment: Second generation
  • Not sure why this is crucial, but the container consistently fails to start without it

The container uses https://github.com/dwahler/go-tools, which is a fork of golang.org/x/tools that doesn't serve traffic until it's finished scanning the repository, which is necessary to play nicely with Cloud Run's traffic balancing.

Fixes #1398

@dwahler dwahler requested review from bpmct and greyscaled May 12, 2022 23:05
@bpmct
Copy link
Member

bpmct commented May 12, 2022

is there a preview URL? 👀

@codecov
Copy link

codecov bot commented May 12, 2022

Codecov Report

Merging #1415 (fa8b819) into main (333d6a4) will decrease coverage by 0.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1415      +/-   ##
==========================================
- Coverage   67.19%   67.14%   -0.06%     
==========================================
  Files         287      287              
  Lines       19307    19307              
  Branches      241      241              
==========================================
- Hits        12974    12964      -10     
- Misses       4998     5006       +8     
- Partials     1335     1337       +2     
Flag Coverage Δ
unittest-go-macos-latest 54.16% <ø> (-0.04%) ⬇️
unittest-go-postgres- 65.61% <ø> (-0.02%) ⬇️
unittest-go-ubuntu-latest 56.55% <ø> (ø)
unittest-go-windows-2022 52.51% <ø> (+0.11%) ⬆️
unittest-js 74.65% <ø> (ø)
Impacted Files Coverage Δ
codersdk/provisionerdaemons.go 61.97% <0.00%> (-5.64%) ⬇️
peerbroker/listen.go 84.03% <0.00%> (-3.37%) ⬇️
coderd/provisionerdaemons.go 63.81% <0.00%> (-1.18%) ⬇️
provisionerd/provisionerd.go 76.57% <0.00%> (-0.81%) ⬇️
peer/conn.go 80.58% <0.00%> (-0.74%) ⬇️
provisioner/terraform/provision.go 72.30% <0.00%> (+0.40%) ⬆️
agent/agent.go 67.14% <0.00%> (+1.23%) ⬆️
provisioner/echo/serve.go 59.20% <0.00%> (+4.80%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 333d6a4...fa8b819. Read the comment docs.

@dwahler
Copy link
Contributor Author

dwahler commented May 12, 2022

is there a preview URL? 👀

Sort of: https://internal-docs-c2oq3ixdcq-uc.a.run.app/pkg/github.com/coder/coder/

Unfortunately it's a bit clumsy to access at the moment. Based on the discussion in #1398 I haven't yet made the endpoint publicly accessible, so you have to pass a bearer token as described here. I used the ModHeader Chrome extension to test it out.

@dwahler dwahler requested a review from a team May 12, 2022 23:28
Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dwahler dwahler merged commit 86cba4d into main May 13, 2022
@dwahler dwahler deleted the david/godoc-container branch May 13, 2022 00:39
@misskniss misskniss added this to the V2 Beta milestone May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically build and deploy godoc
4 participants