← Back to Pull requests

feat(image-updater): publish one bundle per release command (AROSLSRE-2927) #8328

Open
unknown opened this pull request with 289 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 30, 2026 13:45 UTC
Author

Jira: AROSLSRE-2927

What

Adds image-updater release, which publishes one bundle end to end:

1. reset the checkout to --base-commit and remove untracked digest outputs and helm fixtures, so a previous bundle cannot leave state behind;
2. resolve only the bundle's components (configuration filtered by the bundle's groups);
3. run the render targets (make yamlfmt, make update-helm-fixtures, make -C config materialize);
4. validate the change set against the digest path allowlist;
5. render the pull request body and publish on bot/image-updater-<bundle> with a bundle marker, title and commit message;
6. write image-updater-<bundle>.html and .json under --artifact-dir.

Defaults derive from the bundle, and --token-file/--dry-run follow the existing publish conventions.

The command takes git, updater, renderer and publisher as interfaces, so the flow is unit-tested without Prow; the updater and GitHub credential construction are shared with update/publish instead of duplicated, and artifact replacement moved into the summary package for both commands.

Why

The bundle split needs orchestration that can be tested and reasoned about. Keeping it in Bash produced four review defects in a row (yq --arg, environment scoping, || fail fall-through, leaked untracked outputs); each is a language-level trap that Go removes. One invocation per bundle also matches the intended deployment: one ProwJob per bundle, with its own status, retry and log.

Testing

  • go test -C tooling/image-updater ./...

  • Runner tests: happy path (URL, changed count, body carries the bundle and table, card links the pull request, JSON carries the bundle), no-op bundle skips publication, allowlist rejection, dependency failures name the step and bundle, missing dependencies rejected.

  • Options tests: validation table and resolved defaults; unknown bundle; configuration whose bundles do not partition the groups.

  • Regression test for checkout isolation: a committed config/tracked.yaml, an untracked config/leftover.yaml and a modified tracked file; after reset the leftover is gone and the tracked content is restored.

  • CLI smoke: release --help, and --bundle nope fails with bundle "nope" is not configured.
  • Diff: 289 lines (+216 / -73) across 3 files Reviewer: redhat-chai-bot Review duration: 99m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 289 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.339
    Real PR Conversation Timeline
    1 comments
    "Review active on #8328"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.8% (MEDIUM) · Higher = larger blast radius
    39.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 46.7% · Lower = rushed or shallow review
    46.7%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 21.2% · Safe to merge
    21.2%
    Repository