tools: fix ci_changes_per_commit.py crash on null workflowRun - #63
Closed
mikeysklar wants to merge 1 commit into
Closed
tools: fix ci_changes_per_commit.py crash on null workflowRun#63mikeysklar wants to merge 1 commit into
mikeysklar wants to merge 1 commit into
Conversation
check_suite["workflowRun"] is null for check suites that are not attached to a
workflow run, for example one that was deleted or one belonging to an app
integration. get_commit_depth_and_check_suite() dereferenced it
unconditionally:
TypeError: 'NoneType' object is not subscriptable
which fails the scheduler job's Get-last-commit-with-checks step. Skip those
entries rather than indexing into them.
Owner
Author
|
Merged upstream as adafruit#11205. Closing so there is a single thread. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
check_suite["workflowRun"]is null for check suites not attached to a workflow run, such as one that was deleted or one belonging to an app integration.get_commit_depth_and_check_suite()dereferenced it unconditionally and raisedTypeError: 'NoneType' object is not subscriptable, failing the scheduler job's Get-last-commit-with-checks step.Why
Tooling only. Skipping those entries is the minimal fix; the loop is looking for the "Build CI" workflow run and an entry without one can never match.
Hardware tested
Not applicable, this is a CI script.
Scope
One guard, one file. No change to which commit is selected when
workflowRunis present.AI assistance
Written with Claude Code.