Skip to content

Normalize Go download version in devcontainer build to handle GO_VERSION=1.21#67

Merged
chefgs merged 5 commits intomainfrom
copilot/fix-go-installation-issues
Apr 15, 2026
Merged

Normalize Go download version in devcontainer build to handle GO_VERSION=1.21#67
chefgs merged 5 commits intomainfrom
copilot/fix-go-installation-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

Devcontainer builds failed in the Go install layer when GO_VERSION was set to a major.minor value (for example, 1.21), because the Dockerfile attempted to fetch a non-existent tarball name. This change makes Go version resolution robust for both short and fully-qualified version inputs.

  • Version normalization

    • Introduced GO_DOWNLOAD_VERSION in the Go install step.
    • Converts major.minor input to major.minor.0 (e.g., 1.211.21.0).
    • Leaves already fully-qualified versions unchanged.
  • Download path hardening

    • Switched Go artifact URL usage to a single computed tarball variable.
    • Uses go.dev/dl with explicit tarball naming derived from normalized version.
  • Fail-fast integrity guard

    • Added non-empty artifact check (test -s) before extraction to avoid opaque tar extraction failures on bad/empty downloads.
GO_DOWNLOAD_VERSION="${GO_VERSION}" \
&& case "${GO_DOWNLOAD_VERSION}" in *.*.*) ;; *.*) GO_DOWNLOAD_VERSION="${GO_DOWNLOAD_VERSION}.0" ;; esac \
&& GO_TARBALL="go${GO_DOWNLOAD_VERSION}.linux-amd64.tar.gz" \
&& curl -fsSLO "https://go.dev/dl/${GO_TARBALL}" \
&& test -s "${GO_TARBALL}" \
&& tar -C /usr/local -xzf "${GO_TARBALL}"

chefgs added 3 commits April 15, 2026 16:28
- Bump Python to 3.12, Java to 21, Node.js to 22, and Go to 1.25.0.
- Upgrade Nexus to 3.91.0, Prometheus to 3.5.1, Grafana to 12.4.2, K9s to 0.50.16, ArgoCD to 3.3.6, Flux to 2.8.5, and Kustomize to 5.8.0.
- Modify configuration files (.devcontainer/README.md, configure.py, devcontainer.env.json, devcontainer.json) to reflect new versions.
- Update CLI options in devopsos.py and scaffold_devcontainer.py to use the latest versions as defaults.
@chefgs chefgs marked this pull request as ready for review April 15, 2026 12:26
@chefgs chefgs merged commit de70cba into main Apr 15, 2026
8 checks passed
@chefgs chefgs deleted the copilot/fix-go-installation-issues branch April 15, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants