fix(deploy): make the Route host/domain/path overrides take effect - #5425
Merged
norman-abramovitz merged 1 commit intoJun 5, 2026
Merged
Conversation
The deploy wizard's Route section collected host, domain and path but they were dead. cf CLI v8 dropped the host/domain manifest attributes in favour of `routes:`, the push reads a specific route only from the manifest, and the manifest file was never rewritten between fetch and push. The path field was additionally mis-wired to cf push's source `-p` flag (and then overwritten by the fetched source dir). Compose host+domain+path into a `routes:` entry and write it into the manifest, via the v8 manifestparser so unmodeled keys (processes, sidecars, metadata, ...) survive, before the push parses it. Override-wins: it replaces the application's route set and strips the deprecated host/hosts/domain/domains/no-hostname keys, which cf v8 rejects alongside `routes:`. The manifest is left untouched when no-route/random-route is set or no route can be composed. Closes cloudfoundry#5400 (Host/Domain overrides item).
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.
Problem
The deploy-from-Git/file wizard's Route section collects host, domain and path, but they were dead:
host/domainmanifest attributes in favour ofroutes:. The push reads a specific route only from the manifest (there is no host/domain push flag), and the manifest file was never rewritten between fetch and push — so host/domain were silently discarded.-pflag, and then overwritten by the fetched source directory — so it did nothing in the normal case and set a bogus filesystem path in the docker case.Fix
Compose
host+domain+pathinto a singleroutes:entry (host.domain/path) and write it into the manifest before the push parses it, using the cf v8manifestparserfor the round-trip so that fields the parser does not model (processes, sidecars, metadata, services, …) survive via its inlineRemainingManifestFieldsmap.Semantics:
host/hosts/domain/domains/no-hostnamekeys, which cf v8 rejects alongsideroutes:.no-route/random-routeis set (those are push flags; the wizard disables the address fields in those modes, so leaked values must not become a route) or when no route can be composed (a host/path with no domain to attach to).Backend-only — the frontend already ships
host/domain/pathin the overrides payload; nothing in the UI changes.Testing
route_override_test.go— 13 cases: route composition table (host/domain/path, apex domain, leading-slash normalisation, host-only/path-only → no route); convert + strip-deprecated + preserve-unmodeled-keys; domain-only; path folding; and no-route / random-route / no-override / host-only all leaving the manifest byte-for-byte unchanged.go build,go vet, fullcfapppushpackage suite green.Closes #5400 — the final remaining item of the deploy-from-Git wizard usability/correctness issues (the other items landed previously).