-
Notifications
You must be signed in to change notification settings - Fork 17
ci: Pass in __bootc_validation as boolean, not string #236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pass in a YAML true value as `__bootc_validation: true` using
the --extra-vars option to ensure that `__bootc_validation` is
treated as a boolean and not a string value.
`-e "__bootc_validation: true"`
You can also use JSON format:
`-e '{"__bootc_validation": true}'`
but YAML is simpler in this case.
Signed-off-by: Rich Megginson <[email protected]>
Reviewer's GuideThis PR refines the CI pipeline and documentation by upgrading GitHub Actions checkout steps to v5, updating tox-lsr dependency versions, ensuring __bootc_validation is passed as a YAML boolean, enhancing TF test failure detection logic, and adding a local CI testing guide. Flow diagram for improved TF test failure detection logicflowchart TD
A["Check for pending workflow runs"]
B["If pending, exit"]
C["Query workflow runs for PR title"]
D["Select runs with conclusion 'failure' or 'cancelled'"]
E["Get RUN_ID"]
F["If RUN_ID is null, exit"]
G["Proceed with further steps"]
A --> B
A --> C
C --> D
D --> E
E --> F
E --> G
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `.github/workflows/tft_citest_bad.yml:37` </location>
<code_context>
fi
+ # TF tests can fail or can be cancelled due to TF internal issues
RUN_ID=$(gh api "repos/$REPO/actions/workflows/tft.yml/runs?event=issue_comment" \
- | jq -r "[.workflow_runs[] | select( .display_title == \"$PR_TITLE\" ) | select( .conclusion == \"failure\" ) | .id][0]")
+ | jq -r "[.workflow_runs[] | select( .display_title == \"$PR_TITLE\" ) | select( .conclusion == \"failure\" or .conclusion == \"cancelled\" ) | .id][0]")
if [ "$RUN_ID" = "null" ]; then
echo "Failed workflow not found, exiting"
</code_context>
<issue_to_address>
Including 'cancelled' workflows may have unintended side effects.
Including 'cancelled' workflows may cause reruns of jobs that were stopped intentionally. Please verify if this matches the desired behavior, or consider filtering out cancelled jobs to prevent unintended reruns.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| RUN_ID=$(gh api "repos/$REPO/actions/workflows/tft.yml/runs?event=issue_comment" \ | ||
| | jq -r "[.workflow_runs[] | select( .display_title == \"$PR_TITLE\" ) | select( .conclusion == \"failure\" ) | .id][0]") | ||
| | jq -r "[.workflow_runs[] | select( .display_title == \"$PR_TITLE\" ) | select( .conclusion == \"failure\" or .conclusion == \"cancelled\" ) | .id][0]") | ||
| if [ "$RUN_ID" = "null" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Including 'cancelled' workflows may have unintended side effects.
Including 'cancelled' workflows may cause reruns of jobs that were stopped intentionally. Please verify if this matches the desired behavior, or consider filtering out cancelled jobs to prevent unintended reruns.
Pass in a YAML true value as
__bootc_validation: trueusingthe --extra-vars option to ensure that
__bootc_validationistreated as a boolean and not a string value.
-e "__bootc_validation: true"You can also use JSON format:
-e '{"__bootc_validation": true}'but YAML is simpler in this case.
Signed-off-by: Rich Megginson [email protected]
Summary by Sourcery
Add documentation for running CI tests locally and update CI workflows to use checkout@v5 and tox-lsr 3.11.1; pass __bootc_validation as a boolean in integration tests and include cancelled runs in failure detection.
CI:
Documentation: