Skip to content

Fix when.status filter evaluation and add workflow-level support#6183

Merged
6543 merged 18 commits into
woodpecker-ci:mainfrom
qwerty287:respect-status
Mar 2, 2026
Merged

Fix when.status filter evaluation and add workflow-level support#6183
6543 merged 18 commits into
woodpecker-ci:mainfrom
qwerty287:respect-status

Conversation

@qwerty287
Copy link
Copy Markdown
Contributor

fix #6161

And also allow when.status at workflow level. runs_on is deprecated then.

@qwerty287 qwerty287 requested a review from a team March 2, 2026 12:03
@qwerty287 qwerty287 added bug Something isn't working server labels Mar 2, 2026
@qwerty287 qwerty287 changed the title Independently evaluate status filter Independently evaluate status filter and support on workflows Mar 2, 2026
@woodpecker-bot
Copy link
Copy Markdown
Contributor

woodpecker-bot commented Mar 2, 2026

Surge PR preview deployment was removed

Comment thread server/pipeline/stepbuilder/step_builder.go Outdated
@6543
Copy link
Copy Markdown
Member

6543 commented Mar 2, 2026

@qwerty287 hope you don't mind ... i refactored two things :)

-> we often have the usecase of filter unique slices so now there is a generic helper
-> use the official golang deprecation syntax so IDE shows it too

@qwerty287
Copy link
Copy Markdown
Contributor Author

It's ok for me, but I don't think we need that UniqSlice… I mean it won't break if someone sets status: [failure, failure]. Wouldn't add extra code for this, but I won't block this of course.

@6543
Copy link
Copy Markdown
Member

6543 commented Mar 2, 2026

I know we have more parts in our codebase where we manually use a map to filter uniq stuff and we can with this slowly adopt it more and more.

I also plan to upstream into golang an slices.Filter or slices.Uniq depending on what is already worked on ...

Comment thread pipeline/frontend/yaml/linter/schema/schema.json Outdated
@6543
Copy link
Copy Markdown
Member

6543 commented Mar 2, 2026

@qwerty287 finisched it ... could you look over the new/changed parts and lgtm them ,,, or give feedback :) ?

Comment thread pipeline/frontend/yaml/linter/linter.go
@qwerty287
Copy link
Copy Markdown
Contributor Author

Seems fine for me now, besides that I still don't like the UniqSlice.

@6543
Copy link
Copy Markdown
Member

6543 commented Mar 2, 2026

in this case as it's your pull I'll just move that out and then merge it

@6543 6543 mentioned this pull request Mar 2, 2026
1 task
@6543
Copy link
Copy Markdown
Member

6543 commented Mar 2, 2026

the current queue impl. should tollerate duplicates. but still i dont like that impl. details of the parser leak out to other parts.

as it can be done later I move this into another pull/issue/discusion for later

@6543 6543 enabled auto-merge (squash) March 2, 2026 16:16
@6543 6543 merged commit 39a7ebd into woodpecker-ci:main Mar 2, 2026
8 checks passed
@woodpecker-bot woodpecker-bot mentioned this pull request Mar 2, 2026
1 task
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 2, 2026

Codecov Report

❌ Patch coverage is 69.44444% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 31.98%. Comparing base (480f673) to head (c53ab7b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pipeline/frontend/yaml/linter/linter.go 21.42% 10 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6183      +/-   ##
==========================================
+ Coverage   31.93%   31.98%   +0.05%     
==========================================
  Files         423      423              
  Lines       28563    28584      +21     
==========================================
+ Hits         9121     9142      +21     
+ Misses      18600    18599       -1     
- Partials      842      843       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@6543
Copy link
Copy Markdown
Member

6543 commented Mar 2, 2026

@qwerty287 qwerty287 deleted the respect-status branch March 5, 2026 13:41
@xoxys
Copy link
Copy Markdown
Member

xoxys commented Mar 12, 2026

@woodpecker-ci/maintainers this is a breaking change. Working CI pipelines now fail:

image

Please mark it as such and remember to release a major version bump next if this was not a mistake.

@6543
Copy link
Copy Markdown
Member

6543 commented Mar 12, 2026

it schould be written non breaking :/

so this is a bug of this implementation

@qwerty287
Copy link
Copy Markdown
Contributor Author

Oh sorry, this shouldn't fail indeed, only warn. Will check it out later

@qwerty287 qwerty287 mentioned this pull request Mar 13, 2026
@woodpecker-bot woodpecker-bot mentioned this pull request Apr 1, 2026
1 task
@woodpecker-bot woodpecker-bot mentioned this pull request Apr 15, 2026
1 task
@6543 6543 changed the title Independently evaluate status filter and support on workflows Fix when.status filter evaluation and add workflow-level support Apr 19, 2026
@woodpecker-bot woodpecker-bot mentioned this pull request Apr 27, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Status filter in when condition list entries not evaluated independently

4 participants