Repository navigation
[draft] Make sure variable-based paths get /Workspace or /Volume prefixes - #7286
Open
lennartkats-db wants to merge 4 commits into
Open
lennartkats-db wants to merge 4 commits into
lennartkats-db wants to merge 4 commits into
Conversation
Contributor
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 2 tests: regression=2 unreleased=0 coverage=0 failing=0
TestAccept/bundle/variables/prepend-workspace-var/DMS=: branch ✅ | main (8e70c8b) ❌ | latest (v1.26.0) ❌main (8e70c8b): latest (v1.26.0): TestAccept/bundle/variables/prepend-workspace-var/DMS=true: branch ✅ | main (8e70c8b) ❌ | latest (v1.26.0) ❌main (8e70c8b): latest (v1.26.0): |
Collaborator
✅ Integration test reportCommit: 2f2c6a7
Top 9 slowest tests (at least 2 minutes):
|
This branch has not been deployed
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.
Changes
Resolve variable-based workspace paths before adding the
/Workspaceprefix. Then resolve other configuration references against those final paths. A root under/Usersor/Sharedproduces one prefix on its derived workspace paths and on direct or variable-aliased job file paths inbundle validate.The early resolution visits only workspace path fields. Literal
/Usersand/Sharedpaths retain their prefix behavior, and paths under/Volumesremain untouched. An exact/Workspaceroot now remains unchanged when the prefix pass runs again.Why
Issue #2181 reports that
workspace.root_path: ${var.workspace_root}/...leaves a job file path under/Users. Prefixing happens before variable resolution, so the variable-led root is skipped. Resolving just the workspace paths before prefixing lets other references use their final values while retaining the existing resolution limit for unrelated cyclic variables.Fixes #2181
Tests
go test ./bundle/config/mutator ./bundle/phases -count=1 -timeout 20mgo test ./acceptance -run '^TestAccept/bundle/variables/(prepend-workspace-var|resolve-builtin|complex-cycle|complex-cycle-self)$' -count=1 -v -timeout 30m(both DMS variants)./task check-changelog/Usersin dev and/Sharedin prod.This PR was written by Codex.