Skip to content

fix: handle skipped condition dependencies in target gating#8426

Merged
olblak merged 11 commits into
updatecli:mainfrom
nickzerjeski:fix-conditional-target-dependson-skipped-7918
Apr 26, 2026
Merged

fix: handle skipped condition dependencies in target gating#8426
olblak merged 11 commits into
updatecli:mainfrom
nickzerjeski:fix-conditional-target-dependson-skipped-7918

Conversation

@nickzerjeski

Copy link
Copy Markdown
Contributor

Fix #7918

Ensure AND dependency evaluation does not treat skipped conditions as successful prerequisites. A target depending on conditions should only run when those condition dependencies explicitly succeed.

Test

To test this pull request, you can run the following commands:

cd pkg/core/pipeline
go test -run 'TestRunTarget'

Additional Information

Checklist

  • I have updated the documentation via pull request in website repository.

Tradeoff

  • This tightens behavior for condition dependencies only; existing source/target dependency semantics are unchanged.

Potential improvement

  • Add a dedicated shouldSkipResource unit test table covering all result/operator/category combinations for stronger behavior guarantees.

Copilot AI review requested due to automatic review settings April 13, 2026 08:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates target gating so that condition dependencies must explicitly succeed (not be skipped) before a dependent target can run, addressing #7918.

Changes:

  • Update shouldSkipResource to treat non-SUCCESS condition dependency results as blocking for AND gating.
  • Add a TestRunTarget case for a target depending on multiple conditions to ensure it is skipped when prerequisites don’t succeed.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
pkg/core/pipeline/utils.go Tightens AND dependency gating for condition prerequisites to require explicit SUCCESS.
pkg/core/pipeline/targets_test.go Adds a regression test to ensure a target is skipped when condition prerequisites don’t succeed.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/core/pipeline/utils.go Outdated
Comment thread pkg/core/pipeline/targets_test.go Outdated
@nickzerjeski

Copy link
Copy Markdown
Contributor Author

@copilot apply changes based on the comments in this thread

@olblak

olblak commented Apr 16, 2026

Copy link
Copy Markdown
Member

Thank you for the pullrequest, I'll try to review it soon

@olblak olblak added bug Something isn't working core All things related to Updatecli core engine labels Apr 17, 2026
olblak
olblak previously approved these changes Apr 17, 2026

@olblak olblak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank for the contribution

@olblak olblak enabled auto-merge (squash) April 17, 2026 13:14
@olblak olblak merged commit 4024479 into updatecli:main Apr 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core All things related to Updatecli core engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conditionnal Targets with depends_on seems broken

3 participants