← Back to Pull requests

fix: handle 127 error code for podman compatibility #2778

Closed
unknown closed this pull request without merging on Sep 18, 2024 20:12 UTC
View on GitHub
unknown unknown commented on Sep 12, 2024 14:34 UTC
Author

<!-- Type of change
Please label this PR with one of the existing labels, depending on the scope of your change
-->

What does this PR do?

  • Handle 127 error code for podman compatibility.

  • After merging this, we still need to disable ryuk for tests to work with Podman. Raised an issue for this: https://github.com/testcontainers/testcontainers-go/issues/2781
  • Why is it important?

  • Docker has a bug where it overrides exit code = 127 with exit code = 126. However, Podman handles these error codes separately.

  • While testing etcd module, my container was returning exit code = 127 on Podman. test-containers.go didn't know what to do with 127 error code as it follows the moby project so, it was stuck in an infinite loop.

  • Although, the container was up but the code was panicking.
  • Related issues

  • Some relevant PRs in other projects:

  • - https://github.com/containers/podman/issues/367
    - https://github.com/moby/moby/issues/45795

    How to test this PR

  • Output for podman exec -ti <containerid> /bin/sh -c "echo test"; echo $?
  • podman exec -ti 3604e691a9efbaa916bdeaa365f7481a04aca79722c430d3cc285b671215cfec /bin/sh -c "echo test"; echo $?
    Error: crun: executable file `/bin/sh` not found in $PATH: No such file or directory: OCI runtime attempted to invoke a command that was not found
    127
    

    <!-- Optional

    Follow-ups

    Add here any thought that you consider could be identified as an actionable step once this PR is merged.
    -->

    Diff: 188 lines (+141 / -47) across 2 files Reviewer: vchandela Review duration: 8978m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 188 lines diff across 2 files
    0.36
    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.314
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #2778"
    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: 35.8% (MEDIUM) · Higher = larger blast radius
    35.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: 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: 14.1% · Safe to merge
    14.1%