woodpecker-ci / woodpecker

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

Add "meta" workflow for matrix workflows, to have easy status check rules #2886

Open xoxys opened 9 months ago

xoxys commented 9 months ago

Component

server

Describe the bug

With v2.0 the behavior of matrix workflows has changes. Instead of a single ci/woodpecker/pr/test check, multiple ci/woodpecker/pr/test/<NUMBER> checks are reported now, one for each item in the matrix. As a result, existing rules for required status checks in the forge are broken, which also affects all automations bases on successful status checks.

image

IMO there should be a single check again instead of dedicated checks for each matrix element. A matrix can be dynamic (frequent changes to the number of elements) which makes it nearly impossible to enforce it.

System Info

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

Additional context

No response

Validations

xoxys commented 9 months ago

I guess related PR is https://github.com/woodpecker-ci/woodpecker/pull/2695

qwerty287 commented 9 months ago

This is kind of hard to do internally, because every matrix axis is a workflow and workflows have a separated status. Related: https://github.com/woodpecker-ci/woodpecker/issues/2819

xoxys commented 9 months ago

Understandable, but IMO this really makes it quite useless if you need to enforce those checks to pass. While I build and test tool today for python3.10, 3.11 and 3.12 I might add python-nightly tomorrow and remove 3.10 a few days later. Adjusting the forge settings every time the matrix changes doesn't scale at least not for me.

qwerty287 commented 9 months ago

I see the issue, but I'm not sure about a good way how to implement this cleanly. I can take a look at it though if I find the time...

xoxys commented 9 months ago

Thanks dont wanted to rush you or anybody else.

6543 commented 8 months ago

I propose (if not already done so) a "meta" pipeline that collect all matrix status and if one fails it is failed, else it is passed.

this is reported back so you can set that one as required.

for gitea you can just specify a regex in recent versions :)