3

For some reason, I can no longer deploy existing google functions from my local machine or from github actions. Whenever I deploy using the gcloud functions deploy command, I get the following error in the console: ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: Unknown Syntax Error: Invalid option name ("--production=false"). I am not using a --production=false option in my gcloud deploy command, so I don't really understand where that is coming from.

Build logs always failing on:
Step #1 - "build": Unable to delete previous cache image: DELETE https://us.gcr.io/v2/{{projectId}}/gcf/{{region}}/{{guid}}/cache/manifests/sha256:{{imageId}}: GOOGLE_MANIFEST_DANGLING_TAG: Manifest is still referenced by tag: latest.

Deploy command:

gcloud functions deploy --runtime=nodejs16 --region=us-central1 {{function_name}} --entry-point={{node_function}} --trigger-topic={{topic_name}}

Attempted with the following gcloud versions and got the same result each time:
370, 371, 369, 360

I am not sure where this is coming from. I did not have this problem when I deployed just yesterday and it is not specific to my local machine.

  • 1
    Are you trying to update an existing cloud function or create a new one? Also can you please provide the exact `gcloud functions deploy` you are using with the proper flags? Thanks! Will help to debug with more context. – Jack Wotherspoon Feb 01 '22 at 20:04
  • Updated the question to have deploy command, that it is an existing function, and that the issue doesn't seem to be specific to my local machine, since it also affects our github actions that are used to deploy. I also cannot deploy using the branch that I successfully deployed yesterday, so it should not be a code change either. – Zachary Johnson Feb 01 '22 at 22:16
  • It appears that google has done some sort of update that broke yarn v2 and v3 around 1/31/22. The --production=false error is coming from yarn. If you downgrade to yarn v1 it will not break when deploying. I am waiting on them to tell me if this is intentional or if they intend on fixing it. – Zachary Johnson Feb 07 '22 at 20:19

1 Answers1

1

This was due to a regression issue on Google's part. They released a fix for it today and deploys are working again now.

Issue: https://github.com/GoogleCloudPlatform/buildpacks/issues/175#issuecomment-1030519240