fix: add ruleSyntax v2 to varnish.base, magento2.base and magento2.gr… - #940
Open
perichus wants to merge 1 commit into
Open
fix: add ruleSyntax v2 to varnish.base, magento2.base and magento2.gr…#940perichus wants to merge 1 commit into
perichus wants to merge 1 commit into
Conversation
ilnytskyi
added a commit
to ilnytskyi/warden
that referenced
this pull request
Jul 29, 2026
~/.warden/etc/traefik/traefik.yml was copied from config/traefik/traefik.yml only when absent, so installs predating the Traefik 3 upgrade keep a static config without `core.defaultRuleSyntax`. Traefik 3 then parses Warden's v2 style router rules as v3 syntax and silently stops matching them, which is the subdomain routing breakage reported in wardenenv#933. The shipped config has carried that setting for a while; it simply never reached existing installs. Declaring `ruleSyntax=v2` per router (wardenenv#934, wardenenv#940) works around this from the wrong layer: it has to be repeated for every new router, and it cannot cover routers users define themselves in project .warden/warden-env.yml files or in custom environment types, which Warden has no way to rewrite. Refresh the file whenever it drifts from the shipped version, keeping the previous copy as traefik.yml.bak. Restart Traefik when it changed, since Traefik never reloads static configuration and Compose will not recreate the container just because a bind mounted file changed. The container is resolved via the com.docker.compose.project=warden labels rather than by the name `traefik`, so a Traefik belonging to something else on the same daemon is never restarted. This runs on `svc up` and on `env up|start|restart`, the latter being what people actually reach for after an upgrade. Set WARDEN_TRAEFIK_CONFIG_MANAGED=0 to hand-manage the file. `warden doctor` now reports the running Traefik image and diffs the in-use config against the shipped one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ilnytskyi
added a commit
to ilnytskyi/warden
that referenced
this pull request
Jul 29, 2026
`${WARDEN_HOME_DIR}/etc/traefik/traefik.yml` is generated configuration, not
user state: it was copied over unconditionally on every `svc up` until f449fda
added an existence guard, turning it into a one-time seed.
Nine months later b8ad77d moved Traefik to 3.6 and 6d7bd66 added
`core.defaultRuleSyntax: v2` to the shipped config, but by then nothing
delivered that to existing installs. Traefik 3 parses Warden's v2 style router
rules as v3 syntax and silently stops matching them, which is the subdomain
routing breakage in wardenenv#933.
Declaring `ruleSyntax=v2` per router (wardenenv#934, wardenenv#940) patches this from the wrong
layer: it has to be repeated for every new router, and it cannot cover routers
users define themselves in project .warden/warden-env.yml files or in custom
environment types, which Warden has no way to rewrite. Correcting the static
config fixes all of them at once.
Restore the original behaviour, refreshing the file whenever it drifts from the
shipped version and keeping the previous copy as traefik.yml.bak. Restart
Traefik when it changed, since Traefik never reloads static configuration and
Compose will not recreate the container just because a bind mounted file
changed. The container is resolved via its com.docker.compose.project=warden
labels rather than by the name `traefik`, so a Traefik belonging to something
else on the same daemon is never touched, and the running-status filter avoids
starting one that was deliberately stopped.
This runs on `svc up` and on `env up|start|restart`, the latter being what
people actually reach for after an upgrade. Anyone needing a hand-written
static config can override the service's volumes via
`${WARDEN_HOME_DIR}/docker-compose.yml`, which `svc up` already supports.
`warden doctor` now reports the running Traefik image and diffs the in-use
config against the shipped one.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Check List
Describe the bug
Same as #933 and #934 but completed for varnish and all magento2 files.
To Reproduce
warden env upExpected behavior
You will be able to access with subdomain to the service
Additional context
Add any other context about the problem here.