Skip to content

fix(devcontainer): start Docker on Ubuntu 26.04 hosts and replace flaky installs - #2826

Merged
Quang Nguyen (nddq) merged 1 commit into
mainfrom
nddq/devcontainer-ci-flakes
Nov 17, 2026
Merged

Quang Nguyen (nddq) merged 1 commit into
mainfrom
nddq/devcontainer-ci-flakes

Conversation

@nddq

@nddq Quang Nguyen (nddq) commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Description

The DevContainer workflow times out on every run since ubuntu-latest moved to Ubuntu 26.04 on 2026-11-12. ghcr.io/devcontainers/features/docker-in-docker at 2.16.1 always selects iptables-legacy in the container. The Ubuntu 26.04 kernel has no legacy iptables NAT tables, so dockerd does not start:

(*) Failed to start docker, retrying...

The postStartCommand then waits for docker info until the job reaches its 30-minute limit. Upstream fixed this in devcontainers/features#1637 and moved the selection to container start in 4.0.0.

Before that, the workflow failed often because three features download from hosts that GitHub runners cannot reach reliably.

  • LLVM: ghcr.io/devcontainers-community/features/llvm runs llvm.sh from apt.llvm.org and adds that apt repository. The requests to apt.llvm.org fail intermittently, and sometimes DNS returns only an IPv6 address that the build container cannot reach:

    [error] Distribution 'ubuntu' in version '24.04.5 LTS (Noble Numbat)' is not supported by this script.
    [error] GPG key not reachable at https://apt.llvm.org/llvm-snapshot.gpg.key
    Connecting to apt.llvm.org (apt.llvm.org)|2a04:4e42:79::561|:443... failed: Network is unreachable.
    

    The repository adds no packages. Its noble builds of LLVM 17 (1:17.0.6~++…) sort below Ubuntu's 1:17.0.6-9ubuntu1, so apt installs the Ubuntu packages anyway.

  • kind: ghcr.io/devcontainers-extra/features/kind resolves latest through the GitHub API without a token. Shared runner IPs hit the rate limit, and latest can resolve to an alpha tag that has no release:

    urllib.error.HTTPError: HTTP Error 403: rate limit exceeded
    nanolayer.installers.gh_release.resolvers.asset_resolver.AssetResolver.NoReleaseError: no release exists for repo:kubernetes-sigs/kind and tag: v0.34.0-alpha
    
  • Helm: ghcr.io/devcontainers/features/kubectl-helm-minikube downloads the Helm release signature from GitHub with curl -sSL, without --fail and without a retry. When GitHub answers with an error, curl saves the error body as the signature file, and gpg --verify stops the build:

    Verification failed!
    gpg: no valid OpenPGP data found.
    gpg: the signature could not be verified.
    

    The feature also installs the latest Helm release (v4.3.2 today), not the v4.1.4 in go.mod.

The Go version check also passes when the versions differ. The Go feature installs 1.24.11, but go.mod requires go 1.26.8. With GOTOOLCHAIN=auto, go version downloads and reports go1.26.8.

This PR:

  • Docker-in-Docker: bumps the feature 2.16.1 → 4.1.3. That version selects iptables-legacy or iptables-nft at container start, from the kernel modules of the host.
  • LLVM: drops the feature. The apt-deps step installs clang-17 and llvm-17 from the Ubuntu archive (the same packages as before) and creates the clang and llvm-strip symlinks.
  • kind: drops the feature. sigs.k8s.io/kind v0.33.0 joins the tool block in go.mod, and go-setup runs go install sigs.k8s.io/kind. go.mod marks tool dependencies // indirect, which Dependabot skips by default, so dependabot.yaml allows sigs.k8s.io/kind by name. Minor and patch updates arrive with the k8s group.
  • Helm: sets the helm option of the feature to none. helm.sh/helm/v4/cmd/helm joins the tool block in go.mod, and go-setup installs it with kind. helm.sh/helm/v4 is a direct dependency, so the Helm CLI now has the version of the Helm SDK, and Dependabot updates it already.
  • minikube: sets the minikube option of the feature to none. The repository uses kind, not minikube, and the feature downloads the latest minikube release on each build. The feature still installs kubectl.
  • Go: sets the Go feature to 1.26.8 and runs the version check with GOTOOLCHAIN=local. Also pins golangciLintVersion to 2.11.4, the go.mod version that the golangci-lint workflow builds, so that the editor lints like CI.

Checklist

  • I have read the contributing documentation.
  • I signed and signed-off the commits (git commit -S -s ...). See this documentation on signing commits.
  • I have correctly attributed the author(s) of the code.
  • I have tested the changes locally.
  • I have followed the project's style guidelines.
  • I have updated the documentation, if necessary.
  • I have added tests, if applicable.

Screenshots (if applicable) or Testing Completed

Built the dev container with @devcontainers/cli 0.90.0 (the CLI version that devcontainers/ci uses) on an Ubuntu 24.04 host and ran the workflow's runCmd in it. All steps pass, including the Go version check:

Ubuntu clang version 17.0.6 (9ubuntu1)
Ubuntu LLVM version 17.0.6
go version go1.26.8 linux/amd64
version.BuildInfo{Version:"v4.1", GitCommit:"", GitTreeState:"", GoVersion:"go1.26.8", KubeClientVersion:"v1.36"}
kind v0.33.0 go1.26.8 linux/amd64

helm and kind resolve to /go/bin. The feature build log has no Helm download and no minikube download, and the image has no minikube binary. go generate rebuilds the eBPF objects, and golangci-lint --version reports 2.11.4.

Docker 29.9.3 starts in the dev container with iptables-legacy, the backend that the feature selects on this host. With the alternative set to iptables-nft by hand, dockerd also starts and docker run works. The Ubuntu 24.04 host cannot reproduce the Ubuntu 26.04 failure, so the DevContainer workflow run on this PR validates that path.

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Retina Code Coverage Report

Total coverage no change

@nddq
Quang Nguyen (nddq) force-pushed the nddq/devcontainer-ci-flakes branch from 5a185a8 to d31b6f3 Compare October 6, 2026 15:00
@nddq
Quang Nguyen (nddq) force-pushed the nddq/devcontainer-ci-flakes branch from d31b6f3 to 465b1f3 Compare November 16, 2026 15:46
@nddq Quang Nguyen (nddq) changed the title fix(devcontainer): replace flaky LLVM and kind features fix(devcontainer): replace flaky LLVM, kind, and Helm installs Nov 16, 2026
@nddq
Quang Nguyen (nddq) marked this pull request as ready for review November 16, 2026 15:48
@nddq
Quang Nguyen (nddq) requested a review from a team as a code owner November 16, 2026 15:48
ibezrukavyi
ibezrukavyi previously approved these changes Nov 16, 2026
…ky installs

The DevContainer workflow times out on every run since ubuntu-latest
moved to Ubuntu 26.04. The docker-in-docker feature at 2.16.1 always
selects iptables-legacy in the container. The Ubuntu 26.04 kernel has
no legacy iptables NAT tables, so dockerd does not start. The
postStartCommand then waits for docker info until the job reaches its
time limit. Bump the feature to 4.1.3, which selects the iptables
backend at container start from the kernel modules of the host.

The build also fails intermittently in three features:

- The LLVM feature downloads llvm.sh from apt.llvm.org and adds that
  apt repository. Requests to apt.llvm.org from GitHub runners fail
  intermittently, and sometimes DNS returns only an IPv6 address that
  the build container cannot reach. The repository adds no packages.
  Its noble builds of LLVM 17 (1:17.0.6~++...) sort below Ubuntu's
  1:17.0.6-9ubuntu1, so apt installs the Ubuntu packages.
- The kind feature resolves "latest" through the GitHub API without a
  token. Shared runner IPs hit the rate limit (HTTP 403), and "latest"
  can resolve to an alpha tag that has no release (HTTP 404).
- The kubectl-helm-minikube feature downloads the Helm release
  signature from GitHub with curl -sSL, without --fail and without a
  retry. When GitHub answers with an error, curl saves the error body
  as the signature file, and gpg --verify stops the build. The feature
  also installs the latest Helm release, not the Helm version in
  go.mod.

Install clang-17 and llvm-17 from the Ubuntu archive in the apt-deps
step in place of the LLVM feature. Add kind and the Helm CLI as tools
in go.mod, and install them with go install, which downloads through
the Go module proxy. Set the Helm option of the kubectl-helm-minikube
feature to "none". helm.sh/helm/v4 is a direct dependency, so the Helm
CLI now has the version of the Helm SDK, and Dependabot updates it.
Also set the minikube option to "none". The repository uses kind, not
minikube, and the feature downloads the latest minikube release on
each build.
go.mod marks the kind tool dependency as indirect, and Dependabot
skips indirect dependencies by default, so allow sigs.k8s.io/kind by
name.

The Go version check also passes when the versions differ. The Go
feature installs 1.24.11, but go.mod requires 1.26.8. With
GOTOOLCHAIN=auto, go version downloads and reports the go.mod version.
Set the feature to 1.26.8, and run the check with GOTOOLCHAIN=local.
Pin golangci-lint to the go.mod tool version, which the lint workflow
builds, so that the editor lints like CI.

Signed-off-by: Quang Nguyen <[email protected]>
@nddq Quang Nguyen (nddq) changed the title fix(devcontainer): replace flaky LLVM, kind, and Helm installs fix(devcontainer): start Docker on Ubuntu 26.04 hosts and replace flaky installs Nov 16, 2026
@nddq
Quang Nguyen (nddq) force-pushed the nddq/devcontainer-ci-flakes branch from 465b1f3 to c1ac9b2 Compare November 16, 2026 16:34
@nddq
Quang Nguyen (nddq) added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit d5da20f Nov 17, 2026
36 checks passed
@nddq
Quang Nguyen (nddq) deleted the nddq/devcontainer-ci-flakes branch November 17, 2026 16: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