Skip to content

x/build/cmd/tip: deploy instructions for talks.golang.org are non-functional #38120

@dmitshur

Description

@dmitshur

(Factoring this out from #36825 to describe this problem in more detail, without derailing the higher level decision in that issue.)

The deploy instructions for talks.golang.org that are in the x/cmd/tip README have become outdated and cannot be used today.

Doing gcloud --project golang-org app deploy --no-promote talks.yaml in x/build/cmd/tip directory results in:

ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: Legacy health checks are no longer supported for the App Engine Flexible environment. Please remove the 'health_check' section from your app.yaml and configure updated health checks. For instructions on migrating to split health checks see https://cloud.google.com/appengine/docs/flexible/java/migrating-to-split-health-checks

That is easily fixable with:

--- a/cmd/tip/talks.yaml
+++ b/cmd/tip/talks.yaml
@@ -8,5 +8,7 @@ manual_scaling:
 env_variables:
   TIP_BUILDER: 'talks'
 
-health_check:
-  enable_health_check: False
+liveness_check:
+  path: /_ah/health
+readiness_check:
+  path: /_ah/health

The next problem is that the Dockerfile in x/build/cmd/tip directory was modified in CL 176257 with the assumption that it would be called with the x/build root directory as the working directory. That CL modified cmd/tip/Makefile like this:

 docker-image: Dockerfile *.go
-	docker build --force-rm -f Dockerfile --tag=$(IMAGE_PROD):$(VERSION) .
+	docker build --force-rm -f Dockerfile --tag=$(IMAGE_PROD):$(VERSION) ../..

However, that's not compatible with the App Engine-based deploy for talks.golang.org, because doing gcloud app deploy in x/build/cmd/tip causes Cloud Build to try to run Dockerfile with x/build/cmd/tip as the working directory, so statements like COPY go.mod /go/src/golang.org/x/build/go.mod produce errors:

Step #1: Step 6/20 : COPY go.mod /go/src/golang.org/x/build/go.mod
Step #1: COPY failed: stat /var/lib/docker/tmp/docker-builder636121389/go.mod: no such file or directory

/cc @cagedmantis @toothrot @andybons

Metadata

Metadata

Assignees

No one assigned

    Labels

    Buildersx/build issues (builders, bots, dashboards)FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions