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

Fix error message "unable to unmarshal Cloud Run Service config" for Cloud Run Job #9440

Closed
martivo opened this issue Jun 12, 2024 · 0 comments · Fixed by #9443
Closed

Fix error message "unable to unmarshal Cloud Run Service config" for Cloud Run Job #9440

martivo opened this issue Jun 12, 2024 · 0 comments · Fixed by #9443

Comments

@martivo
Copy link

martivo commented Jun 12, 2024

Expected behavior

When the Cloud Run Job specification has an error, throw error "unable to unmarshal Cloud Run Job config" is displayed to user.

https://github.com/GoogleContainerTools/skaffold/blob/v2.12.0/pkg/skaffold/deploy/cloudrun/deploy.go#L443
https://github.com/GoogleContainerTools/skaffold/blob/v2.12.0/pkg/skaffold/deploy/cloudrun/deploy.go#L300

Also it should state that the spec is either job or service, so something like "unable to unmarshal Cloud Run Service or Job api version and kind from config" would be more appropriate.
https://github.com/GoogleContainerTools/skaffold/blob/v2.12.0/pkg/skaffold/deploy/cloudrun/deploy.go#L482

Actual behavior

The error message "unable to unmarshal Cloud Run Service config" is thrown regardless of whether it is a Cloud Run Service or Job.

At the moment the same error message is used in 6 different places in deploy.go, making it a bit difficult to pinpoint the actual issue and can mislead users in their debugging efforts.

In our current effort we thought skaffold is trying to interpretate the Job spec as a Service specification, creating confusion.

Information

  • Skaffold version: v2.12.0
  • Operating system: Mac
  • Installed via: Homebrew
  • Contents of skaffold.yaml:
apiVersion: skaffold/v4beta7
kind: Config
metadata:
  name: entigo-infralib
deploy:
  cloudrun: {}
profiles:
  - name: plan
    manifests:
      rawYaml:
        - plan.yaml
  - name: apply
    manifests:
      rawYaml:
        - apply.yaml

Steps to reproduce the behavior

Create an invalid cloud run job spec and try to deploy the cloud run jobs in google cloud deploy.

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

Successfully merging a pull request may close this issue.

1 participant