Auto-negotiate Docker API Version#12256
Conversation
f72a9af to
67dae4a
Compare
thaJeztah
left a comment
There was a problem hiding this comment.
thanks! A colleague actually noticed the hard-coded value in Traefik, and we were planning to open a PR, but looks like that dropped off our list 🙈
Changes SGTM (with my limited knowledge of this codebase); I left some suggestions / thoughts (but those definitely could be handled separately).
|
Tested the build on our system and can confirm it works. |
thaJeztah
left a comment
There was a problem hiding this comment.
FWIW, changes in this LGTM (assuming CI is happy)
|
w.r.t. updating to the new (moby.moby/client, moby/moby/api) modules; #12255 (comment)
I don't think there's an immediate urgency, and the changes in this PR look good to fix the problem at hand, unless traefik must support features only available in API v1.52 or up. While the project should transition at some point, the client module is still a v0.x release, and there will be breaking changes in future in the client signatures (we plan to migrate it to functional options, and improve usability of streaming endpoints). If would be good to update the dependency to the lastest v28.x version (currently at v28.3.3, which is an older minor release), and it won't hurt to explore what changes are needed to transition, but it's fine to keep that for a future exercise. |
|
@rtribotte looks like CI needs a kick / approval to run 😅 |
|
Does anyone have an estimate for when this update will be available? I have several instances down because of this issue, and I prefer not to use workarounds. |
|
Until this lands on Docker Hub, you can use the image the PR author @felixbuenemann kindly published instead:
Works for us. |
|
Interesting; was Looks like it's gone from Docker Hub; https://hub.docker.com/r/letsencrypt/pebble I do see a reference to |
|
67dae4a to
5663508
Compare
https://github.com/traefik/traefik/tags until 3.6.1 appears there nothing will happen. |
Great fix! Do we know when it will be released? @felixbuenemann |
|
Stuck with this as well - pulled v3.6 image, same issue. I'd argue that the severity and impact of this issue should be enough to create a new release |
|
as a workaround i switched to |
I missed it in the thread. great and thx to @felixbuenemann ! |
now that traefik/traefik#12256 is merged
now that traefik/traefik#12256 is merged
now that traefik/traefik#12256 is merged
Relevant upstream commit is here: * traefik/traefik#12256
Suite à breaking change docker API traefik/traefik#12256
traefik:v3.0 ships Docker client API v1.24, but GitHub Actions runners now require minimum API v1.44. This caused Traefik's Docker provider to fail silently -- no containers discovered, no routers created, all HTTP requests returned 404. traefik:v3.6 includes auto-negotiate Docker API version (traefik/traefik#12256, shipped in v3.6.1).
* Upgrade Traefik from v3.0 to v3.6 traefik:v3.0 ships Docker client API v1.24, but GitHub Actions runners now require minimum API v1.44. This caused Traefik's Docker provider to fail silently -- no containers discovered, no routers created, all HTTP requests returned 404. traefik:v3.6 includes auto-negotiate Docker API version (traefik/traefik#12256, shipped in v3.6.1). * Fix network isolation and Traefik restart behavior - Preserve default project network alongside traefik-network in override so inter-service DNS (e.g. app -> postgres) stays project-scoped and avoids cross-project alias collisions on the shared external network - Use 'docker compose up -d' instead of 'restart' in restartTraefik() so container is recreated when compose file changes (new port mappings) * Harden integration tests with try/finally cleanup and fetch timeouts - Wrap all integration tests in try/finally to ensure services are cleaned up even when assertions fail (prevents leaked containers from poisoning subsequent tests) - Add fetchWithTimeout helper with AbortController to prevent hung requests from consuming the entire poll window - Increase timeouts for CI runners where Docker startup is slower - Replace setInterval-based polling with while-loop polling for cleaner control flow * Improve sample image reproducibility for CI - Add image tags so pre-built images are reused across worktrees instead of rebuilding from scratch each time - Switch to npm ci with lockfile for deterministic installs - Add .dockerignore files to exclude .git, .port, and node_modules from build context * Add CI pre-pull/build step and failure-only Traefik diagnostics - Pre-pull and build Docker images before tests run so integration tests don't spend time on cold image pulls - Add failure-only diagnostics step that dumps Traefik logs, config, routers, and entrypoints when tests fail (makes future CI failures much faster to triage) * Deduplicate fetchWithTimeout into test utils * Cap vitest workers to half of available cores Leave headroom for Docker containers, Traefik, and other child processes spawned by integration tests.
What does this PR do?
This PR fixes #12253 by removing the hardcoded docker api version and relying on auto-negotiation between the docker client (sdk) and server using WithAPIVersionNegotiation().
Motivation
Traefik currently fails to work with Docker v29 with the following errors:
Fixes #12253
Additional Notes
felixbuenemann/traefik:v3.6on docker hub (created withmake build-image)