Add CI validation for hook ordering prefixes#744
Add CI validation for hook ordering prefixes#744abays wants to merge 1 commit intoopenstack-k8s-operators:mainfrom
Conversation
ad31e37 to
7ee51cf
Compare
fultonj
left a comment
There was a problem hiding this comment.
Thanks Andrew. This looks good. I was about to merge but wanted to point out something claude code discovered in case you want to add it first.
The ci-framework's run_hook module sorts hooks alphabetically by name before executing them. When a pre_stage_run or post_stage_run stage has two or more hooks, this alphabetical sorting can silently alter the intended execution order unless each hook name carries a zero-padded numeric prefix (e.g. "01 Install operator", "02 Create site"). Add .ci/validate-hook-ordering.py to enforce that: - Every hook in a multi-hook stage has a numeric prefix. - Prefixes are sequential with no gaps or duplicates. Wire the script into the GitHub Actions workflow (.github/workflows/automation-schema.yaml) by renaming the files_exist job to validate_automation and adding a step to run the new validator. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7ee51cf to
d7101e4
Compare
|
Build succeeded (gate pipeline). ✔️ noop SUCCESS in 0s |
|
Pull request merge failed: Resource not accessible by integration, You may need to manually rebase your PR and retry. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abays, fultonj The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
CIFMW's run_hook module sorts hooks alphabetically by name before executing them. When a pre_stage_run or post_stage_run stage has two or more hooks, this alphabetical sorting can silently alter the intended execution order unless each hook name carries a zero-padded numeric prefix (e.g. "01 Install operator", "02 Create site").
Add .ci/validate-hook-ordering.py to enforce that:
Wire the script into the GitHub Actions workflow
(.github/workflows/automation-schema.yaml) by renaming the files_exist job to validate_automation and adding a step to run the new validator.
Co-author: Claude Opus 4.6
Depends-On: #745