Take the build copy subdirectory as a single field - #24
Merged
Conversation
The app build configuration reported the copy subdirectory twice, once for the source and once for the destination, always with the same value. The service manifest expresses it once, because a web server and the application it forwards to must resolve the docroot to the same absolute path, and carrying two fields through the wire format only reopened the possibility of them differing. Read copySubdir and apply it under both the --from and --to roots. This requires a backend that reports the field, which renames it in the same change that raises the CLI version the platform installs, so the two move together.
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.
Summary
The app build configuration reported the copy subdirectory twice —
copyFromandcopyTo— always with the same value, because the backend resolves both from the manifest's singlecopySubdir. Carrying two fields through the wire format only reopened the possibility of them differing, which is exactly what collapsing the manifest field to one was meant to prevent: a web server and the application it forwards to must resolve the docroot to the same absolute path.This reads
copySubdirand applies it under both the--fromand--toroots.Rollout
Requires a backend that reports
copySubdir. There is deliberately no fallback to the old field names — the backend change renames the field and raisesWODBY_CLI_VERSIONin the same commit, so the build configuration and the CLI that reads it are deployed together and there is no window where one speaks the other's old contract.Merge and release this first; the backend change pins to the resulting version.
Validation
go build ./...andgo test ./cmd/... ./pkg/...pass. The existingjoinCopyPathtests are unchanged and still cover default, explicit, absolute, nested and empty roots and subdirectories.