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

Kubernetes backend silently discards backend_options errors #4106

Open
3 tasks done
meln5674 opened this issue Sep 12, 2024 · 0 comments
Open
3 tasks done

Kubernetes backend silently discards backend_options errors #4106

meln5674 opened this issue Sep 12, 2024 · 0 comments
Labels
backend/kubernetes bug Something isn't working
Milestone

Comments

@meln5674
Copy link
Contributor

Component

agent

Describe the bug

At this line https://github.com/woodpecker-ci/woodpecker/blob/v2.7.1/pipeline/backend/kubernetes/kubernetes.go#L229 there is no return err, meaning that any errors from parsing backend_options will be silently discarded.

Steps to reproduce

The following pipeline will demonstrate the issue

when:
  - event: push
  - event: manual

steps:
  - name: test
    image: alpine:3.13
    commands:
      - echo "Testing"
    backend_options:
      kubernetes:
        resources:
          requests:
            cpu: 1 # This should be a string, so it won't be set

Expected behavior

The error should be propagated back to the user, and the step should not run. Ideally such an error should be caught during initial pipeline validation.

System Info

{"source":"https://github.com/woodpecker-ci/woodpecker","version":"next-3ce20912cd"}

Additional context

No response

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Checked that the bug isn't fixed in the next version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]
@meln5674 meln5674 added the bug Something isn't working label Sep 12, 2024
@qwerty287 qwerty287 added this to the 3.0.0 milestone Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend/kubernetes bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants