← Back to Pull requests

[AIX] Check installed Go version with GOTOOLCHAIN=local in setup-host.sh #58301

Closed
unknown closed this pull request without merging on Oct 21, 2026 14:49 UTC
View on GitHub
unknown unknown commented on Oct 16, 2026 16:37 UTC
Author

<!-- dd-meta {"pullId":"f65fd0f7-3369-4a80-9636-eab208460069","source":"chat","resourceId":"ac3c0eb7-3ca5-41d7-91d2-667b5d7344c8","workflowId":"8bae74e4-c70a-4d90-911d-4a583799cd00","codeChangeId":"8bae74e4-c70a-4d90-911d-4a583799cd00","sourceType":"code_channel"} -->
<!--Please give us some feedback on your experience writing this PR ! https://app.datadoghq.com/forms/43db4c02-6837-400c-8083-692e141b1b88 !-->

What does this PR do?

Runs the "is Go already installed?" check in Step 3 of packaging/aix/setup-host.sh with GOTOOLCHAIN=local, so it reports the version actually installed in /opt/go. With a correct answer, the script reinstalls Go when the installed version doesn't match .go-version.

Also replaces the outdated comment above the check (it still mentioned 1.26.5/1.26.6) with one that doesn't name versions, and explains why GOTOOLCHAIN=local is needed.

Motivation

The nightly package_aix-ppc64 job fails at the final verification step with go: got go1.26.7, expected go1.26.9 (e.g. https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/2145333658).

Step 3 runs /opt/go/bin/go version from inside the repo before lib/env.sh is sourced, so GOTOOLCHAIN falls back to its default, auto. Since #57994 bumped go.work to go 1.26.9, the installed go1.26.7 switches to a downloaded go1.26.9 toolchain and reports go1.26.9. The check passes and the reinstall is skipped. env.sh then exports GOTOOLCHAIN=local, so the Step 6 verification sees the real go1.26.7 and fails.

Describe how you validated your changes

  • Reproduced the toolchain switch locally by running an older Go binary (1.26.3) from the repo root, where go.work declares 1.26.9:

  • - GOTOOLCHAIN=auto go version → go1.26.9
    - GOTOOLCHAIN=local go version → go1.26.3
  • sh -n on the script passes. shellcheck isn't installed in my environment, so the repo's shell lint in CI is the lint check.

  • Not run on an AIX host. The next package_aix-ppc64 run should install go1.26.9 and pass the final verification.
  • Additional Notes

    Step 6 doesn't need the same change: it runs after env.sh is sourced, and env.sh already exports GOTOOLCHAIN=local.

    🤖 Generated with <span>Claude Code</span> ([link removed](#removed-for-safety))

    <a name="removed-for-safety"></a>

    NOTE: some AI-generated links and images were removed to ensure safety.

    ---

    PR by Bits - View session in Datadog

    Comment @datadog to request changes

    Diff: 316 lines (+237 / -79) across 3 files Reviewer: chouquette Review duration: 7091m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 316 lines diff across 3 files
    0.40
    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.345
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #58301"
    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: 40.4% (MEDIUM) · Higher = larger blast radius
    40.4%
    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: 16.0% · Safe to merge
    16.0%