Add support for archived tree path mapping.#29567
Closed
dabanki wants to merge 2 commits into
Closed
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
fmeum
approved these changes
May 18, 2026
| expect_log_n 'Hello, stdout!' 2 | ||
| } | ||
|
|
||
| function test_path_stripping_archived_tree_artifacts() { |
Collaborator
There was a problem hiding this comment.
Could you also add a test that covers archived tree artifacts in runfiles?
is a TODO that would probably need to be resolved for this, but it may be very easy (justmapForRunfiles the location).
Contributor
Author
There was a problem hiding this comment.
Good catch! Updated.
aranguyen
approved these changes
May 18, 2026
fmeum
approved these changes
May 20, 2026
Contributor
Author
|
Thanks! I'll handle pulling this one in internally, there are a couple other changes that need to be made on top of this to land. |
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.
Description
This PR enables output path mapping (config stripping) for
ArchivedTreeArtifacts.ArchivedTreeArtifacts are compressed.zipcontainer directories generated for remote transfer that inject a virtual prefix segment (:archived_tree_artifacts) immediately after the output root (e.g.bazel-out/:archived_tree_artifacts/k8-fastbuild/bin/...).Previously,
StrippingPathMapperhardcoded the configuration segment location at segment index1and the root-relative path at segment index2. This caused Bazel to strip the:archived_tree_artifactsprefix instead of the configuration prefix, leading to incorrect string length calculations and path translations.We resolved this by:
getConfigSegmentIndex(execPath)method that shifts the configuration segment index from1to2when the:archived_tree_artifactsprefix is present.StringStripperinto a single, pattern using an optional capturing group(:archived_tree_artifacts/)?.Build API Changes
No
Checklist
Release Notes
RELNOTES: Enabled output path mapping (config stripping) support for
ArchivedTreeArtifacts to improve action caching under--experimental_output_paths=strip.