woodpecker-ci / woodpecker

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

Matrix builds reports overwrite each other #713

Closed ChewingBever closed 11 months ago

ChewingBever commented 2 years ago

Component

other

Describe the bug

I've noticed that when I run a matrix build, it gets reported in Gitea's UI as being successful, even though one or more of the builds are still running. It's seems that it reports being successful after the first build succeeds.

System Info

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

Additional context

No response

Validations

fcool commented 2 years ago

I just tried to create a solution here. I guess, the problem originates from server/remote/gitea/gitea.go:324 (Status), where the Status of the current proc is read. And probably this have to take other procs into account. But as I am neither familiar with go nor with the data structures of woodpecker, I did not find out, where to find the related procs. (Are those children?)

Maybe I could try to help with the solution, if someone pushes me in the right direction ;)

6543 commented 2 years ago

https://codeberg.org/6543/vallumd-ci-test/commit/4a68ae80e53c6a518a8244be8c39fb44bef09ba1

-> it shows "success" but it's not ... (https://ci.codeberg.org/6543/vallumd-ci-test/build/2/8)

6543 commented 1 year ago

there is not jet a decisions made what we do report back: :+1: : just collect and if non fails its successful :rocket: : append a suffix to the report id string :smile: : do both ... (let them report independent and have a "meta" pipeline report back)

this does highly affect how branch-prediction can be set in forges so it will be a breaking change in one or another constellation

wiktor-k commented 1 year ago

I've also encountered this issue.

One way to workaround the problem would be to treat each matrix pipeline instance as a separate thing. I've seen this on GitHub where it happens that a matrix pipeline is expanded into 33 jobs or so. Example: https://github.com/rustyhorde/sss/pull/6/checks

It would be also good to be able to customize the status name in woodpecker yml, similarly to what GitHub actions allow: https://github.com/sfackler/rust-openssl/blob/master/.github/workflows/ci.yml#L222 (one could use matrix properties to customize this name).

Phew, I hope you don't mind me. Thanks for the excellent piece of software! 👋

6543 commented 1 year ago

Note to me: create empty "base workflow" that summarizes (success if all success) and try to add support for "tags" into status report to forges?