← Back to Pull requests

imagebuildah: return true from waitForStage when stage fails with error #7141

Open
unknown opened this pull request with 198 lines diff across 2 files
View on GitHub
unknown unknown commented on Oct 03, 2026 05:43 UTC
Author

<!--
Thanks for sending a pull request!

Please make sure you've read and understood our contributing guidelines
(https://github.com/containers/buildah/blob/main/CONTRIBUTING.md) as well as ensuring
that all your commits are signed with git commit -s.
-->

What type of PR is this?

<!--
Please label this pull request according to what type of issue you are
addressing, especially if this is a release targeted pull request.

Uncomment only one /kind <> line, hit enter to put that in a new line, and
remove leading whitespace from that line:
-->

/kind bug

What this PR does / why we need it:


This fixes a bug that was mentioned in the below attached issue. In waitforstage(); it was returning false with the error when earlier stage finished with an error. All subsequent callers checked it, but they expect it to be true due to which this error was swallowed and moved forward. During parallel builds (--jobs=0 as shown in the issue), this lead to race condition where subsequent stage called s.Copy() on container that had already been torn down causing a sigsegv

How to verify it


1. Run parallel multi-stage failure tests:
buildah build --jobs=0 --layers=false --
platform=linux/amd64,linux/386 \
-f tests/bud/multiarch/Dockerfile.fail-
multistage tests/bud/multiarch

2. Run the unit test suite:
go test -v ./imagebuildah/...

Which issue(s) this PR fixes:


Fixes #6894

Special notes for your reviewer:

Does this PR introduce a user-facing change?

``release-note
None
``

Diff: 198 lines (+148 / -50) across 2 files Reviewer: ajoshua2004 Review duration: 8160m
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.36) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 198 lines diff across 2 files
0.36
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%
42%
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.317
Real PR Conversation Timeline
1 comments
"Review active on #7141"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 43.0% 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: 36.1% (MEDIUM) · Higher = larger blast radius
36.1%
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: 43.0% · Lower = rushed or shallow review
43.0%
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: 20.6% · Safe to merge
20.6%