Skip to content

Conversation

@rwgk
Copy link
Collaborator

@rwgk rwgk commented Jan 30, 2026

@kkraus14 this is a mix of suggestion & question. It boils down to: How do we want to handle the skipped condition?


Change the checks job to test for result != 'success' instead of explicitly checking for 'cancelled' or 'failure' states. This is safer because:

  1. It catches all non-success states - cancelled, failure, skipped, or any unexpected future states that GitHub might introduce

  2. It follows a 'fail closed' approach - if we don't know the state is success, we fail

  3. It's simpler and more maintainable - no need to list specific failure conditions

The possible values for needs.<job>.result are: success, failure, cancelled, or skipped. By checking for 'not success', we ensure we catch any unexpected states and err on the safer side.

Changes

  • Updated doc job check: result == 'cancelled' || result == 'failure'result != 'success'
  • Updated test job checks: result == 'cancelled' || result == 'failure'result != 'success'

Change the checks job to test for 'result != success' instead of
explicitly checking for 'cancelled' or 'failure' states. This is safer
because:

1. It catches all non-success states (cancelled, failure, skipped,
   or any unexpected future states that GitHub might introduce)

2. It follows a 'fail closed' approach: if we don't know the state is
   success, we fail

3. It's simpler and more maintainable than listing specific failure
   conditions

The possible values for needs.<job>.result are: success, failure,
cancelled, or skipped. By checking for 'not success', we ensure we
catch any unexpected states and err on the safer side.
@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Jan 30, 2026

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@rwgk rwgk requested a review from kkraus14 January 30, 2026 23:16
# skipped and should not cause failure.
doc_only=${{ needs.should-skip.outputs.doc-only }}
if ${{ needs.doc.result == 'cancelled' || needs.doc.result == 'failure' }}; then
# Fail if doc job didn't succeed (covers cancelled, failure, skipped, or any unexpected state)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will prevent the [no-ci] support from working properly as that intentionally skips the jobs and that's not a failure that should prevent merging.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, of course, it's right there in the comment 🤦‍♂️, I missed it before. Thanks!

So it'd would have to be result != 'success' && result != 'skipped', and it will not matter unless github adds a new state. Seems unlikely, I don't want to waste CI time on this subtle change.

@rwgk rwgk closed this Jan 31, 2026
@rwgk rwgk deleted the ci_check_not_success branch January 31, 2026 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants