woodpecker-ci / woodpecker

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

Approving pipeline returns 500 #4332

Open anbraten opened 2 weeks ago

anbraten commented 2 weeks ago

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

qwerty287 commented 1 week ago

Seems to work on ci.woodpecker-ci.org

anbraten commented 1 week ago

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

qwerty287 commented 1 week ago

Did you see this more than just one time?

anbraten commented 1 week ago

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