0

I'm trying to deploy a Java 11 Maven project in App Engine(Standard), using mvn appengine:deploy command. It was successful until last week. This week after Google cloud sdk got updated to 288.0.0 the deployment is failing with below error. i tried reverting Cloud SDK version but still the issue persists.

Project Id is of format- google.com:abc-xyz

Cloud Build Log Snippet below:

....

Finished Step #2 - "detector"

Starting Step #3 - "analyzer"

Step #3 - "analyzer": Already have image (with digest): us.gcr.io/gae-runtimes/buildpacks/java11/builder:java11_20200223_11_0_RC00

Step #3 - "analyzer": ERROR: failed to access previous image: could not parse reference: us.gcr.io/**google.com:abc-xyz**/app-engine-tmp/ttl-7d/default/buildpack-app:latest

Finished Step #3 - "analyzer"

ERROR

ERROR: build step 3 "us.gcr.io/gae-runtimes/buildpacks/java11/builder:java11_20200223_11_0_RC00" failed: step exited with non-zero status: 1

-Thanks

DazWilkin
  • 32,823
  • 5
  • 47
  • 88
kirjay
  • 1
  • 1

1 Answers1

0

Your error appears to be a result of the project ID google.com:${ID}

The causes an error for Container Registry because it wants e.g.

[us.]gcr.io/${PROJECT}/${IMAGE}...

but it's getting

[us.]gcr.io/google.com:${PROJECT}..

IIRC google.com: is a defunct method of specifying projects. You should just use ${PROJECT} without any domain prefixing.

Hmmm... you said that the project is in production and this used to work. I think this is possibly (effectively) a breaking change for you. I'll Google it but, using domain prefixes (google.com:) used to be a thing in GCP and perhaps this is now formally deprecated. Guess (!?).

DazWilkin
  • 32,823
  • 5
  • 47
  • 88
  • Thanks Daz, you're right it's because of the project id.I use App engine maven plugin to deploy.I tried providing abc-xyz,google.com/abc-xyz in projectId tag in pom but get an error initially itself, telling invalid project id if i do so.Im not sure if anything needs to be changed here to change the path. Before when the deployment was succesfull there seems to be only 2 steps as seen in cloud build logs 1.fetcher 2.builder.Now there seems to be 8 steps 1.fetcher 2.prep 3.detector 4.analyzer 5.restorer 6.builder 7.exporter 8.deployment-tag it fails in analyzer step. – kirjay Apr 10 '20 at 08:05
  • I encountered this issue once before. IIRC we swapped the project ID as you've done and that addressed it. When I get to my desk, I'll find that issue for you. You may want to file an issue with Google Cloud support? – DazWilkin Apr 10 '20 at 14:48
  • Sorry I brain-farted and forgot to lookup the previous question|answer. I am unable to find it. You should remove "google.com:" entirely from your project references. The correct project ID would be: `abc-xyz`. – DazWilkin Apr 10 '20 at 23:53
  • I found this suggesting that your approach in replacing ":" with "/" should work (https://cloud.google.com/container-registry/docs/overview#domain-scoped_projects). I'm outta ideas, sorry. – DazWilkin Apr 11 '20 at 00:01
  • Thanks,I had a look at that link, its for deployment through Docker file, nothing mentioned for pom file.I tried various combinations of project id, but i get an error telling Invalid project id in build phase itself , if i done give google.com:abc-xyz in pom. – kirjay Apr 13 '20 at 07:07
  • File a support ticket? – DazWilkin Apr 13 '20 at 13:59
  • Yes will raise a ticket for now. – kirjay Apr 14 '20 at 12:09