← Back to Pull requests

fix(PLAT-1943): log in to ECR and retry agent version bumps #154

Closed
unknown closed this pull request without merging on Nov 03, 2026 08:20 UTC
View on GitHub
unknown unknown commented on Oct 28, 2026 13:22 UTC
Author

What this PR does / why we need it:


Linear: PLAT-1943
Related: RUN-1200 · PLAT-1971 · PLAT-1972

Agent version bumps into odigos keep failing silently: the consumer's upgrade-agent resolves image digests anonymously from public.ecr.aws, which returns 429 Too Many Requests on shared runner IPs, and the Slack alert never fires because job.status doesn't reflect failures inside a composite action. apply-agent-version-update now:

  • Assumes ecr-role-to-assume (default ecr-pull-push-role) over OIDC and logs in to public ECR before running make. The AWS credentials stay in step outputs and are only handed to docker login, and the registry login is removed right after make, before the PR steps run. If the role can't be assumed or the login fails, the run continues anonymously with a warning. ecr-login: false opts out.

  • Rejects an instrumentation_agent or version that isn't [A-Za-z0-9._-]+, since make expands both into recipe shells.

  • Gives upgrade-agent 3 attempts (30s, then 60s apart) and restores tracked files between attempts, so a partial rewrite never reaches the PR.

  • Derives the result from its own step outcomes and posts the failure message when the update fails or is cancelled, or when opening or auto-merging the PR fails (with the PR link in the auto-merge case). A run that changes nothing still posts nothing.
  • slack-release-notification gains an optional status input that overrides job.status (existing callers are unchanged) and reads its inputs from env instead of interpolating them into the script.

    Risks: None

    Proof
    Harness run of this branch against odigos main's real agent-deps.mk and Dockerfiles, with Slack pointed at a local listener (run).

    Login and retry: the role is assumed, docker login succeeds, two simulated transient failures each leave a half-rewritten Dockerfile, the third attempt pins ruby-community:v0.0.11 by digest, the login is removed, and the restored tree shows no changes.
    <img width="1447" height="840" alt="plat-1943-retry-login" src="https://github.com/user-attachments/assets/f98744d4-a496-412f-b697-32e40dbfd219" />

    Failure path: a missing tag fails all 3 attempts, then Determine result and Notify Slack run and post the ❌ failure payload.
    <img width="1568" height="688" alt="plat-1943-failure-slack" src="https://github.com/user-attachments/assets/25ee4208-2269-4fe6-8de4-3f1dfeeef8fc" />

    Results: one failure payload for the missing tag; an injected version (v0.0.11;touch${IFS}/tmp/pwned) is rejected before make runs and still alerts. The no-change scenario (not shown) received 0 payloads.
    <img width="1493" height="812" alt="plat-1943-summaries" src="https://github.com/user-attachments/assets/9ecf2219-ab33-446e-9bdc-556b8a8dccc7" />

    Changelog entry: Does this PR introduce a user-facing bug fix, feature, dependency update, or breaking change??


    ``release-note
    NONE
    ``

    🤖 Generated with Claude Code

    Diff: 412 lines (+309 / -103) across 5 files Reviewer: aviadhahami Review duration: 8338m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 412 lines diff across 5 files
    0.45
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    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
    Diff Size diff_size
    0.360
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #154"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 44.9% (MEDIUM) · Higher = larger blast radius
    44.9%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 17.7% · Safe to merge
    17.7%