[8.7.0] 03/23: Manual port of essential parts of: Fix and consolidate repo env handling#29069
Draft
fmeum wants to merge 3 commits intobazelbuild:release-8.7.0from
Draft
[8.7.0] 03/23: Manual port of essential parts of: Fix and consolidate repo env handling#29069fmeum wants to merge 3 commits intobazelbuild:release-8.7.0from
fmeum wants to merge 3 commits intobazelbuild:release-8.7.0from
Conversation
…seful Non-functional changes only: remove Pair indirection in ExternalFilesHelper, extract getExternalRepoName() and getExternalDirectory() helpers, move addExternalFilesDependencies into ExternalFilesHelper, modernize switch expression in DirtinessCheckerUtils, formatting fixes. Does not include the functional behavior change of refetching repos on external modifications. (cherry picked from commit 5e3f0c8)
… inputs Ports the essential API changes from 41ccfef needed by later feature commits: - Add RepoRecordedInput.WithValue record with parse/toString/escape/unescape - Add overloaded isAnyValueOutdated(Environment, BlazeDirectories, List<WithValue>) - Remove Comparable<RepoRecordedInput> and COMPARATOR (replaced by order preservation) - Change TreeMap to LinkedHashMap in RepositoryDelegatorFunction for order preservation (cherry picked from commit 41ccfef)
…nv handling Ports the essential API changes from 01407ce needed by later feature commits: - Add EnvironmentVariableValue record type - Add RepoEnvironmentFunction with REPO_ENV + client env fallback - Register REPOSITORY_ENVIRONMENT_VARIABLE in SkyFunctions and SkyframeExecutor - Update EnvVar.getSkyKey() to use RepoEnvironmentFunction - Update EnvVar.isOutdated() to use EnvironmentVariableValue On 8.7.0, RepoEnvironmentFunction checks --repo_env first, then falls back to the client environment via ClientEnvironmentFunction, since the consolidated repo env computation from CommandEnvironment is not present. (cherry picked from commit 01407ce)
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.
Cherry-pick of 01407ce for release 8.7.0 (part 03/23 of the remote repo contents cache feature). Depends on #29068.
Ports the essential API changes needed by later feature commits:
EnvironmentVariableValuerecord typeRepoEnvironmentFunctionwith--repo_env+ client env fallbackREPOSITORY_ENVIRONMENT_VARIABLEinSkyFunctionsandSkyframeExecutorEnvVar.getSkyKey()to useRepoEnvironmentFunctionEnvVar.isOutdated()to useEnvironmentVariableValueOn 8.7.0,
RepoEnvironmentFunctionchecks--repo_envfirst, then falls back to the client environment viaClientEnvironmentFunction, since the consolidated repo env computation fromCommandEnvironmentis not present.