Skip to content

Fix HasBeenTested for all corner cases - #1547

Merged
matheuscscp merged 1 commit into
fluxcd:mainfrom
dee0sap:1546-controller-confused-when-test-hook-fails-with-403
Jul 23, 2026
Merged

Fix HasBeenTested for all corner cases#1547
matheuscscp merged 1 commit into
fluxcd:mainfrom
dee0sap:1546-controller-confused-when-test-hook-fails-with-403

Conversation

@dee0sap

@dee0sap dee0sap commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

xref: #1546

Updated test status handling so a release only counts as tested when all selected test hooks have reached a terminal phase. Empty selected hook sets still count as tested for charts with no matching tests. Filtered-out hooks are no longer recorded in the snapshot, avoiding false incomplete results from intentionally skipped tests.

@matheuscscp

Copy link
Copy Markdown
Member

If I understand correctly, this fix implies that a non-empty list of zero TestHooks still means the release was not tested, but it's also semantically different from an empty list of TestHooks? Why is that?

@matheuscscp
matheuscscp force-pushed the 1546-controller-confused-when-test-hook-fails-with-403 branch from 19003f7 to f7da5ae Compare July 23, 2026 11:01
@matheuscscp matheuscscp changed the title fix 1546 SnapShot.HasBeenTested should not treat Zero TestHookStatus as test result Fix HasBeenTested to return true only when all filtered test hooks were tested Jul 23, 2026
@matheuscscp matheuscscp added bug Something isn't working backport:release/v1.6.x To be backported to release/v1.6.x labels Jul 23, 2026
@matheuscscp
matheuscscp requested a review from stefanprodan July 23, 2026 11:03
tested

Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
Signed-off-by: d.small@sap.com <d.small@sap.com>
@matheuscscp
matheuscscp force-pushed the 1546-controller-confused-when-test-hook-fails-with-403 branch from f7da5ae to d8452e2 Compare July 23, 2026 11:18
@matheuscscp matheuscscp changed the title Fix HasBeenTested to return true only when all filtered test hooks were tested Fix HasBeenTested for all corner cases Jul 23, 2026

@stefanprodan stefanprodan 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.

LGTM

@matheuscscp
matheuscscp merged commit 83b01ef into fluxcd:main Jul 23, 2026
6 checks passed
@fluxcdbot

Copy link
Copy Markdown
Member

Successfully created backport PR for release/v1.6.x:

@dee0sap

dee0sap commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Hey @matheuscscp

Thanks for the review and the question.

I was wanting to just address the problem my team was having without having to worry about any subtleties of how HasBeenTested is used.

Also thanks @stefanprodan :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:release/v1.6.x To be backported to release/v1.6.x bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants