woodpecker-ci / woodpecker

Woodpecker is a simple yet powerful CI/CD engine with great extensibility.
https://woodpecker-ci.org
Apache License 2.0
3.94k stars 352 forks source link

Restarting a pipeline that failed due to missing secrets is not enough #2982

Open runephilosof-karnovgroup opened 7 months ago

runephilosof-karnovgroup commented 7 months ago

Component

server

Describe the bug

Restarting a pipeline that failed due to missing secrets is not enough. I have seen it in a tag event.

secret "***" not found or not allowed to be used

Then I added the secret and restarted the pipeline and the error changed to

[generic]
pipeline definition not found

System Info

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

Additional context

Might be related to https://github.com/woodpecker-ci/woodpecker/issues/1678

Validations

zc-devs commented 1 month ago

I'm facing it too.

Component

server

Describe the bug

After fixing error (secrets permissions in my case) pipeline can't restart.

Steps to reproduce

  1. Create secret available for push event
  2. Commit and push with [skip ci] pipeline
    skip_clone: true
    steps:
    test:
    image: alpine
    commands:
      - echo Hello
    secrets:
      - retsec
  3. Run pipeline manually
  4. Get error [generic] secret "retsec" is not allowed to be used with pipeline event "manual"
  5. Allow secret for manual event
  6. Restart previously failed pipeline by clicking Restart button
  7. Get error [generic] pipeline definition not found

Expected behavior

After fixing secret's permissions, pipeline can be restarted successfully.

System Info

Woodpecker 2.6.0, Gitea 1.22.0, Kubernetes.

Additional context

Can be reproduced with organization secret with push, manual and tagging. After allowing tag and restarting, it fails.

woodpecker-server.log