Skip to content

[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
fmeum:rrcc-8.7.0-03
Draft

[8.7.0] 03/23: Manual port of essential parts of: Fix and consolidate repo env handling#29069
fmeum wants to merge 3 commits intobazelbuild:release-8.7.0from
fmeum:rrcc-8.7.0-03

Conversation

@fmeum
Copy link
Copy Markdown
Collaborator

@fmeum fmeum commented Mar 24, 2026

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:

  • 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.

fmeum added 3 commits March 13, 2026 18:06
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants