Make CI action bumps easier to validate - #23890
Conversation
Add the workflow file to the pull_request paths filter so action-version bumps (e.g. Renovate updates to tj-actions/changed-files) are exercised on the PR that introduces them. Guard the hash-check script on any_changed so a workflow-only change still runs the action but doesn't fail with no link file to validate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a dry_run input to test-results-master.yml that runs the badge step but skips committing to the badges branch, and expose it as a workflow_dispatch input on flaky-tests.yml. This lets action bumps (e.g. Renovate updates to emibcn/badge-action) be validated on demand without moving the public badge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| description: "Skip committing the test-results badge." | ||
| required: false | ||
| default: false | ||
| type: boolean |
There was a problem hiding this comment.
question
I don't see where this is exercised from the PR changes
What is the use case for the dry_run?
There was a problem hiding this comment.
It’s so we can trigger the workflow manually with workflow_dispatch to validate changes for Renovate PRs, without updating the badge. It's on the PR description
There was a problem hiding this comment.
I see, from the description I understood it was meant to be used automatically to check the Renovate PRs
There was a problem hiding this comment.
Does this mean we will need to remember to do this on each Renovate PR?
If so, can we run the dry_run versions of these workflows automatically instead?
There was a problem hiding this comment.
I would add the validation steps to the runbook along with the other actions that need to be checked.
My concern was that this workflow is fairly expensive to run every time there's a change, since it's only really needed when emibcn/badge-action is bumped, not when the other action is. But Renovate PRs only run once a week, so I guess it's not a big deal. I added the trigger.
- Add pull_request trigger scoped to .github/workflows/test-results-master.yml - Auto-enable dry_run when triggered by pull request to avoid committing during validation Rationale: Allows self-validation of the workflow when test-results-master.yml is modified, mirroring the pattern already used for release-hash-check This commit made by [/dd:git:commit:quick](https://github.com/DataDog/claude-marketplace/tree/main/dd/commands/git/commit/quick.md)
Validation ReportAll 21 validations passed. Show details
|
|
* Run release-hash-check on its own workflow changes Add the workflow file to the pull_request paths filter so action-version bumps (e.g. Renovate updates to tj-actions/changed-files) are exercised on the PR that introduces them. Guard the hash-check script on any_changed so a workflow-only change still runs the action but doesn't fail with no link file to validate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Remove redundant comments Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Add dry-run mode to skip the test-results badge commit Add a dry_run input to test-results-master.yml that runs the badge step but skips committing to the badges branch, and expose it as a workflow_dispatch input on flaky-tests.yml. This lets action bumps (e.g. Renovate updates to emibcn/badge-action) be validated on demand without moving the public badge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Trim dry_run input descriptions Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore(ci): run flaky-tests workflow on test-results-master.yml changes - Add pull_request trigger scoped to .github/workflows/test-results-master.yml - Auto-enable dry_run when triggered by pull request to avoid committing during validation Rationale: Allows self-validation of the workflow when test-results-master.yml is modified, mirroring the pattern already used for release-hash-check This commit made by [/dd:git:commit:quick](https://github.com/DataDog/claude-marketplace/tree/main/dd/commands/git/commit/quick.md) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
What does this PR do?
Makes two CI workflows able to exercise their actions on demand, so version bumps (e.g. Renovate updates) can be validated without risky side effects:
release-hash-check.yml: adds the workflow file to thepull_requestpathsfilter and guards the hash-check script onsteps.changed-files.outputs.any_changed == 'true'. Thetj-actions/changed-filesstep now runs on PRs that edit the workflow (validating action bumps), while the script step is skipped when no.in-toto/*.linkfile changed so the check stays green.test-results-master.yml/flaky-tests.yml: adds adry_runinput to the reusabletest-results-master.ymlthat runs the badge step but skips the commit/push to thebadgesbranch, and exposes it as aworkflow_dispatchinput onflaky-tests.yml. This letsemibcn/badge-actionbumps be validated by dispatchingflaky-testswithdry_run: true, without moving the public test-results badge.Motivation
Several actions used in this repo never run on normal PRs because their workflows are triggered by push-to-master, tags, schedules, or
workflow_call. As a result, Renovate action bumps to those workflows merge without ever being exercised in CI. These two changes givetj-actions/changed-filesandemibcn/badge-actiona safe validation path. Existing callers oftest-results-master.yml(master.yml,master-windows.yml) pass nodry_run, so they default tofalseand continue committing the badge as before.Review checklist (to be filled by reviewers)
🤖 Generated with Claude Code