woodpecker-ci/woodpecker

Approving pipeline returns 500

Opened this issue · 5 comments

Component

server

Describe the bug

{"level":"error","error":"UNIQUE constraint failed: steps.pipeline_id, steps.pid","repo":"woodpecker-ci/woodpecker","time":"2024-11-06T17:17:05Z","message":"error persisting new steps for woodpecker-ci/woodpecker#22407 after approval"}
{"level":"error","error":"Error #01: UNIQUE constraint failed: steps.pipeline_id, steps.pid\n","ip":"94.31.107.125","latency":268.264422,"method":"POST","path":"/api/repos/3780/pipelines/22407/approve","status":500,"time":"2024-11-06T17:17:05Z","user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36","time":"2024-11-06T17:17:05Z"}
{"level":"error","error":"UNIQUE constraint failed: steps.pipeline_id, steps.pid","repo":"woodpecker-ci/woodpecker","time":"2024-11-06T17:17:27Z","message":"error persisting new steps for woodpecker-ci/woodpecker#22406 after approval"}
{"level":"error","error":"Error #01: UNIQUE constraint failed: steps.pipeline_id, steps.pid\n","ip":"94.31.107.125","latency":240.480705,"method":"POST","path":"/api/repos/3780/pipelines/22406/approve","status":500,"time":"2024-11-06T17:17:27Z","user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36","time":"2024-11-06T17:17:27Z"}
{"level":"error","error":"UNIQUE constraint failed: steps.pipeline_id, steps.pid","repo":"woodpecker-ci/woodpecker","time":"2024-11-06T17:17:48Z","message":"error persisting new steps for woodpecker-ci/woodpecker#22405 after approval"}
{"level":"error","error":"Error #01: UNIQUE constraint failed: steps.pipeline_id, steps.pid\n","ip":"94.31.107.125","latency":272.414072,"method":"POST","path":"/api/repos/3780/pipelines/22405/approve","status":500,"time":"2024-11-06T17:17:48Z","user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36","time":"2024-11-06T17:17:48Z"}

Steps to reproduce

Click on approving a pipeline

Expected behavior

No response

System Info

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

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]

Seems to work on ci.woodpecker-ci.org

The error was coming from https://ci.woodpecker-ci.org/repos/3780/pipeline/22407. Canceling it and finally restarting allowed me to run it.

Did you see this more than just one time?

Yes I had it with other pipelines as well. Weirdly it was not with all pipelines.

pat-s commented

@anbraten As this issue is still unclear, I'll move it to 3.x. It can be fixed in a patch release then, once understood.