Simple GCP cloud function gives Error ID: 945b0f01 - google-cloud-platform

I am following:
https://codelabs.developers.google.com/codelabs/cloud-functions-python-http#2
to deploy cloud function in GCP.
After I execute gcloud functions deploy I get this error:
Deploying function (may take a while - up to 2 minutes)...⠹
For Cloud Build Stackdriver Logs, visit: https://console.cloud.google.com/logs/viewer?project=XXXXXXXX&advancedFilter=resource.type%3Dbuild%0Aresource.labels.build_id%3Dd01ddb18-ca8f-4157-9538-faf11b530aa2%0AlogName%3Dprojects%2FXXXXXXXXX%2Flogs%2Fcloudbuild
Deploying function (may take a while - up to 2 minutes)...failed.
ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: found incompatible dependencies: "functions-framework 2.1.2 has requirement click<8.0,>=7.0, but you have click 8.0.0."; Error ID: 945b0f01
I googled this error but not much comes back.

Related

gcloud run deploy ERROR: (gcloud.run.deploy) Invalid value for [source]: Dockerfile required when specifying --tag

I was trying to deploy to CloudRun for the first time by following instruction on a blog (By Tom Ray : Deploying a NestJS app to Cloud Run with Github Actions).
In the section "Use gcloud run deploy", when giving the command gcloud run deploy I got this unclear error message:
Deployment failed
ERROR: (gcloud.run.deploy) Invalid value for [source]: Dockerfile required when specifying --tag
Searching the web I could not find an answer or hint to explain the error message.
After moving on to another tutorial I understood what my mistake was.
It was a simple "case sensitive" syntax error naming of the docker file.
I named it "dockerfile" and it should have been named "Dockerfile".
This is a unique naming convention from all the other filenames in the project, they are either all lowercase or all uppercase.
A better error message would have been "ERROR: Missing Dockerfile", that would have been enough for me to find the cause.

Unable to deploy Google Cloud Function due to mysterious --production=false flag

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.
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

Deployment of dotnet core application fails in Elastic Beanstalk

I have created Elastic Beanstalk using Cloudformation template and deploying a dotnet core application in it. While trying to deploy it, the deployment was failing and it shows the below issues:
Inside my environments in Beanstalk im seeing below error:
Create environment operation is complete, but with errors. For more information, see troubleshooting documentation.
[Instance: i-0d2a1ee08dc2813ff ConfigSet: Infra-EmbeddedPreBuild, Hook-PostInit, Hook-PreAppDeploy, Infra-EmbeddedPostBuild, Hook-EnactAppDeploy, Hook-PostAppDeploy, Infra-WriteVersionOnStartup] Command failed on instance. Return code: 1 Output: null.
The Health status is showing severe and if I visit the causes, im getting the below error:
Application deployment failed at 2021-08-19T05:36:34Z with exit status 1 and error: .
Process default has been unhealthy for 19 minutes (Target.FailedHealthChecks).
In Cloudwatch log groups, the deployment log shows the below deployment failure:
AWSBeanstalkCfnDeploy.DeploymentUtils - Unexpected Exception: System.Exception: Exception during deployment. ---> Microsoft.Web.Deployment.DeploymentDetailedException: Object of type 'package' and path 'C:\cfn\ebdata\source_bundle_final.zip' cannot be created. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXCEPTION_WHILE_CREATING_OBJECT. ---> Microsoft.Web.Deployment.DeploymentException: The Zip package 'C:\cfn\ebdata\source_bundle_final.zip' could not be loaded. ---> System.IO.FileNotFoundException: Could not find file 'C:\cfn\ebdata\source_bundle_final.zip'
INFO 1 AWSBeanstalkCfnDeployApp.DeployApp - Event [ERROR]: Deployment Failed: Unexpected Exception
I am using Solution stack as "64 bit windows server 2019 v2.6.8 running IIS 10.0", not sure if that is causing the issue. Can someone provide your inputs on the deployment part on what could could be the issue ? Thanks!

why eb deploy failed on first deploy?

I have created 2 NodeJs environments. It works fine.
Later created a new environment and eb deploy env_name give me the following error:
Creating application version archive "app-ceb7-200713_223016".
Uploading appname/app-ceb7-xxxxx.zip to S3. This may take a while.
Upload Complete.
2020-07-13 17:00:23 INFO Environment update is starting.
2020-07-13 17:00:44 INFO Deploying new version to instance(s).
2020-07-13 17:00:50 ERROR [Instance: i-066f599db7ee34] Command failed on instance.
An unexpected error has occurred [ErrorCode: 0000000001].
2020-07-13 17:00:50 INFO Command execution completed on all instances. Summary:
[Successful: 0, Failed: 1].
2020-07-13 17:00:50 ERROR Unsuccessful command execution on instance id(s) 'i-
06682f599db76ee34'. Aborting the operation.
2020-07-13 17:00:50 ERROR Failed to deploy application.
ERROR: ServiceError - Failed to deploy application.
Why this happen? Thanks in advance
Based on the comments.
To solve the issue, EB logs were inspected to identify the error message:
[app-deploy] - [Install customer specified node.js version]. Stop running the command. Error: unsupported node version >=6, please specify any of node versions in [v12.0.0 v12.1.0 v12.10.0 v12.11.0 v12.11.1 v12.12.0 v12.13.0 v12.13.1 v12.14.0 v12.14.1 v12.15.0 v12.16.0 v12.16.1 v12.16.2 v12.16.3 v12.17.0 v12.18.0 v12.18.1 v12.2.0 v12.3.0 v12.3.1 v12.4.0 v12.5.0 v12.6.0 v12.7.0 v12.8.0 v12.8.1 v12.9.0 v12.9.1]
Then, the correct version of the nodejs was specified in package.json:
"engines": { "node": "12.13.0"},

Not able to Create a Cloud Dataproc Custom Image

Hi i am new to GoogleDataProc and trying to create Custom Image for dataproc. I have followed all the steps as mentioned in documentation but while running it i got SuccessMatch found "BuildSucceeded: Dataproc Initialization Actions Succeeded." and after that i am getting following error:
Command From my local machine with gcloud sdk installed :
python generate_custom_image.py --image-name xyz --dataproc-version 1.2.45 --customization-script customization_script.sh --daisy-path ~/daisy --zone abc-center-b --gcs-bucket gs://xyz_bucket
And got error as :
Error running workflow: step "create-image" run error: googleapi: Error 400: Invalid value for field 'resource.family': 'None'. Must be a match of regex '(?:[a-z] (?:[-a-z0-9]{0,61}[a-z0-9])?)', invalid
Please help me find the cause.
It looks like the cause of this is a recent change.
Just add --family dataproc to your invocation.
I created a pull request to fix this.