← Back to Pull requests

chore: add ENI diagnostic logging to ROSA teardown #3723

Closed
unknown closed this pull request without merging on Nov 09, 2026 19:52 UTC
View on GitHub
unknown unknown commented on Nov 09, 2026 18:49 UTC
Author

Summary

Port the ENI diagnostic logging approach from terraform-provider-rhcs PR #1474 to the ROSA teardown path in tests/utils/handler/resources_handler_clean.go.

  • When waitForVPCEndpointENIsClearedWithTimeout finds VPC endpoint ENIs still blocking cleanup, log each blocking ENI with interface ID, type/status, description, requester/owner IDs, subnet, and attachment details.

  • When deleteForeignOwnedSecurityGroupsWithClient encounters a non-auth security group deletion failure (e.g. DependencyViolation), query and log the ENIs referencing that security group.

  • Add a redaction regex in tests/utils/log/constants.go so AWS account IDs in owner_id, requester_id, and instance_owner_id fields are automatically scrubbed. Service aliases like amazon-elb are preserved (no 12-digit run).
  • This gives the shared-vpc-f3 CI job evidence of which ENI is causing DependencyViolation errors during teardown.

    Jira

  • ROSAENG-00000
  • Type of Change

  • docs / style / refactor / test / chore / build / ci / perf
  • Testing

  • go vet ./tests/utils/handler/... ./tests/utils/log/... — passes

  • go build ./tests/utils/handler/... ./tests/utils/log/... — compiles cleanly

  • go test ./tests/utils/handler/... -v -count=1 — all 35 tests pass, including 4 new tests:

  • - logs diagnostic details for blocking VPC endpoint ENIs (with account ID redaction)
    - does not log diagnostics when no VPC endpoint ENIs are present
    - logs blocking ENIs when security group deletion fails with a non-auth error
    - does not log ENI diagnostics for auth errors
  • goimports -l — no changes needed on any modified file
  • Breaking Changes

  • No breaking changes
  • Checklist

  • Commit format follows ROSAENG-XXXX | type: description

  • Required pre-commit, commit-msg, and pre-push checks pass, via installed hooks or explicit execution

  • Tests added/updated where appropriate

  • Manually tested the change
  • 🤖 Generated with Claude Code

    ---
    AI-generated. Review for accuracy.

    @amandahla requested from Slack

    Chai persona: ocm_qe_ci

    Diff: 259 lines (+194 / -65) across 3 files Reviewer: redhat-chai-bot Review duration: 63m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 259 lines diff across 3 files
    0.39
    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.333
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #3723"
    general weight: 0.35
    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: 39.2% (MEDIUM) · Higher = larger blast radius
    39.2%
    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: 15.5% · Safe to merge
    15.5%
    Repository