Skip to content
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

Cloud Run Service Deploy Failed with error #925

Open
lalkumarrai opened this issue Aug 9, 2024 · 18 comments
Open

Cloud Run Service Deploy Failed with error #925

lalkumarrai opened this issue Aug 9, 2024 · 18 comments

Comments

@lalkumarrai
Copy link

Environment:
(Hint: "Report Extension Issue on Github" command will fill these out for you.)

Version information

Cloud Code Extension version: 2.16.0

VSCode version: 1.92

OS: window 10

Cloud SDK:

Skaffold:

Kubectl:

Description:

When I try to deploy in google cloud run
The service deployment failed suddenly with the issue
Failed to build the app. Error: Failed to create skaffold configuration. Error: processing cli artifacts: malformed artifact provided: {image:gcr.io/flaskgcp-424601/scoro-optimo,builder:Docker,payload:{path:Dockerfile}} From the logs, we can see

Running skaffold command: "C:\Users\user\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\skaffold.exe" init --artifact {"image":"gcr.io/flaskgcp-424601/scoro-optimo","builder":"Docker","payload":{"path":"Dockerfile"}} --skip-deploy --filename C:\Users\user\AppData\Local\Temp\cloud-code-cloud-run-PTBBBp\skaffold.yaml --force
processing cli artifacts: malformed artifact provided: {image:gcr.io/flaskgcp-424601/scoro-optimo,builder:Docker,payload:{path:Dockerfile}}
Failed to build the app. Error: Failed to create skaffold configuration. Error: processing cli artifacts: malformed artifact provided: {image:gcr.io/flaskgcp-424601/scoro-optimo,builder:Docker,payload:{path:Dockerfile}}

Before one week, it used to deploy services without any issue but suddenly its showing issues.

@slde12
Copy link
Collaborator

slde12 commented Aug 9, 2024

Hey, can you submit feedback through extension and include the logs with it? Thanks!

@Operationskcs
Copy link

Did you solve this issue ? Im hving the same one. Evethying was perfect but i got the exact same error. Please let me know. thank

@lalkumarrai
Copy link
Author

I am still having an issue. But found manual way to deploy services till the extension fixed.

@nhat-thai
Copy link

I am encountering an issue where the skaffold.yaml file is not being automatically generated. It appears that this problem is specific to Windows users. Could anyone please confirm if they are experiencing the same issue?

@renzodavid9
Copy link
Member

Hello there,

Could you please share which Skaffold version are you (the Cloud Code VS Code extension) using to deploy to Cloud Run? Thanks!

@nhat-thai
Copy link

Hi renzodavid9,
I'm using Skaffold 2.11.1 and my Cloud Code VS Code extension version is 2.16.2 (August 2024)

@Operationskcs
Copy link

lalkumarrai can you please explain me how you did that manuallly please. Thanks for it bro

@lalkumarrai
Copy link
Author

lalkumarrai commented Aug 15, 2024

Hi Operationskcs, i deployed manually with below steps

  • gcloud auth login
  • docker build -t gcr.io/[projectname]/[servicename] .
  • gcloud auth configure-docker
  • docker push gcr.io/[projectname]/[servicename]
  • gcloud run deploy [servicename] --image gcr.io/[projectname]/[servicename]:latest --platform managed --region [regionname] --allow-unauthenticated --service-account [serviceaccount]

@chetanapsunde
Copy link

I am encountering an issue where the skaffold.yaml file is not being automatically generated. It appears that this problem is specific to Windows users. Could anyone please confirm if they are experiencing the same issue?

Yes, I am facing same

@mostafamarji
Copy link

mostafamarji commented Aug 19, 2024

Getting the same error anyone figured out how to fix the problem?

@ivanporty
Copy link

We are experience an issue with AR and working on the solution with gcloud. We'll update once it's fixed

@Aryido
Copy link

Aryido commented Aug 22, 2024

Environment: (Hint: "Report Extension Issue on Github" command will fill these out for you.)

Version information

Cloud Code Extension version: 2.16.0

VSCode version: 1.92

OS: window 10

Cloud SDK:

Skaffold:

Kubectl:

Description:

When I try to deploy in google cloud run The service deployment failed suddenly with the issue Failed to build the app. Error: Failed to create skaffold configuration. Error: processing cli artifacts: malformed artifact provided: {image:gcr.io/flaskgcp-424601/scoro-optimo,builder:Docker,payload:{path:Dockerfile}} From the logs, we can see

Running skaffold command: "C:\Users\user\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\skaffold.exe" init --artifact {"image":"gcr.io/flaskgcp-424601/scoro-optimo","builder":"Docker","payload":{"path":"Dockerfile"}} --skip-deploy --filename C:\Users\user\AppData\Local\Temp\cloud-code-cloud-run-PTBBBp\skaffold.yaml --force
processing cli artifacts: malformed artifact provided: {image:gcr.io/flaskgcp-424601/scoro-optimo,builder:Docker,payload:{path:Dockerfile}}
Failed to build the app. Error: Failed to create skaffold configuration. Error: processing cli artifacts: malformed artifact provided: {image:gcr.io/flaskgcp-424601/scoro-optimo,builder:Docker,payload:{path:Dockerfile}}

Before one week, it used to deploy services without any issue but suddenly its showing issues.


Hi, @lalkumarrai ,here are my findings:

  • First of all, everything runs smoothly on macOS. This is my test:

Screenshot 2024-08-22 at 7 10 11 PM

But issues indeed occur on Windows.
The key error is 'malformed artifact provided,' which seems to be caused by an inability to recognize the actual parameter following --artifact.

I'm not sure why the error suddenly started appearing on the Windows system. Moreover, from the following message:

malformed artifact provided: {image:gcr.io/flaskgcp-424601/scoro-optimo,builder:Docker,payload:{path:Dockerfile}}

it seems that the JSON keys are not enclosed in double quotes, which is quite strange.

After checking the official examples, enclosing the JSON in single quotes
can resolve the issue.
Screenshot 2024-08-22 at 7 13 08 PM

However, this leads to a further error where the skaffold.yaml is not generated. So I enclosed the Windows-path in single quotes as well.

Now based on testing and using @lalkumarrai 's example, change to this

"C:\Users\user\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\skaffold.exe" init --artifact '{"image":"gcr.io/flaskgcp-424601/scoro-optimo","builder":"Docker","payload":{"path":"Dockerfile"}}' --skip-deploy --filename 'C:\Users\user\AppData\Local\Temp\cloud-code-cloud-run-PTBBBp\skaffold.yaml' --force

Note that I added single quotes (' ') around the JSON and Windows path, then it should work successfully.

My current hypothesis is that the issue might be caused by some changes made to the command template in either the Cloud Code extension or Skaffold.
Both parties may need to verify this...

@LaurentiuAndrei
Copy link

I have the same issue
processing cli artifacts: malformed artifact provided: {image:fastapi-parser,builder:Docker,payload:{path:Dockerfile}}

Building the image manually and deploying using gloud commands works though.

@peppySrJ
Copy link

Still facing the same issue. Any update or ETA here? Been 3 weeks since the issue was opened and over a week since the last update was provided.

@Aryido
Copy link

Aryido commented Aug 28, 2024

Based on my local tests, I downgraded:

  • VSCode to version 1.90.2 ( 2024/08/24 the newest version is 1.92.2)
  • Cloudcode to version v2.14.0 Screenshot 2024-08-28 at 16 26 44

After these downgrades, running Cloud Run worked fine, so we can temporarily revert to this version to keep it running.

The error is likely related to the recent VSCode update.

@kschaab
Copy link
Contributor

kschaab commented Aug 30, 2024

Thank you for the reproduction. We are looking at the issue for a possible fix. Unfortunately we had two issues that looked very similar, this one and one with artifact registry and missed the bug in the product.

@takeruh
Copy link

takeruh commented Sep 26, 2024

The build may have failed, or the image you're deploying may not match what you built.

gcloud builds submit --tag gcr.io/XXXXX/(image name)

gcloud run deploy appname --project XXXXX --image gcr.io/XXXXX/(mismatch image name)

@ttosta-google
Copy link
Collaborator

ttosta-google commented Sep 26, 2024

This issue will be fixed in the next release (next week).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

15 participants