fix: replace peribolos --dump with dry-run for drift detection#103
Merged
marcusburghardt merged 2 commits intoMay 22, 2026
Merged
Conversation
auto-merge was automatically disabled
May 19, 2026 19:25
Pull request was converted to draft
4643542 to
2137c69
Compare
The drift detection workflow used peribolos --dump which internally calls GET /user (BotUser). This endpoint is incompatible with GitHub App installation tokens. Unlike the apply code path where --require-self=false bypasses BotUser, the dump code path calls it unconditionally (verified in kubernetes-sigs/prow dumpOrgConfig). Replace the YAML-diff approach with a dry-run approach: - Run peribolos without --confirm (same flags as apply workflow) - Filter log output for mutation function names (Edit*, Update*, Remove*, Create*, Delete*, Add*) - If any mutations would be applied, drift exists This is also more accurate than YAML diff because it uses peribolos own reconciliation logic, eliminating false positives from dump including fields not declared in peribolos.yaml. Additionally standardize workflow naming: - Rename files: peribolos-apply.yml, peribolos-validate.yml, peribolos-drift.yml - Rename display names: "Peribolos: Apply", "Peribolos: Validate", "Peribolos: Drift" Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Apply the same temp file fix for --github-token-path as in peribolos-apply (process substitution FIFO causes 401s on re-read). Fix shellcheck SC2069: reorder redirects so stderr is captured to the log file (> file 2>&1, not 2>&1 > file). Add --ignore-enterprise-teams to skip ent:* managed teams. Assisted-by: OpenCode (claude-opus-4-6) Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
88c5b88 to
929db91
Compare
Contributor
Author
|
@jpower432 I had to rebase in order to resolve a conflict. :( |
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.
Summary
The drift detection workflow used peribolos --dump which internally calls GET /user (BotUser).
This endpoint is incompatible with GitHub App installation tokens.
Unlike the apply code path where --require-self=false bypasses BotUser, the dump code path calls it unconditionally (verified in kubernetes-sigs/prow dumpOrgConfig).
Replace the YAML-diff approach with a dry-run approach:
This is also more accurate than YAML diff because it uses peribolos own reconciliation logic, eliminating false positives from dump including fields not declared in peribolos.yaml.
Additionally standardize workflow naming:
Related Issues
Review Hints