Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value of SYSTEM_ROOT in windows varies in capitalization leading to cache misses between build servers and developers machines #13187

Open
carpenterjc opened this issue Mar 9, 2021 · 1 comment
Labels
area-Windows Windows-specific issues and feature requests help wanted Someone outside the Bazel team could own this P2 We'll consider working on this in future. (Assignee optional) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: feature request

Comments

@carpenterjc
Copy link

Description of the problem / feature request:

When you run bazel with --incompatible_strict_action_env enabled, differences in the SYSTEM_ROOT environmental variable cause cache misses. On my Windows 10 machine the generated path environmental variable is C:\WINDOWS, however on our 2019 server build machines, this either doesn't exist or is "C:\Windows"

Feature requests: what underlying problem are you trying to solve with this feature?

Would like to have a normalized version of "C:\Windows" such that we get cache hits.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

On an existing project run using --imcompatible_strict_action_env:
set SYSTEM_ROOT=C:\WINDOWS
bazel build //...
set SYSTEM_ROOT=C:\Windows
bazel build //...
I expect to see 0 tasks run, and everything to be a local cache hit, however instead I get rebuilt tasks.

What operating system are you running Bazel on?

Windows 2019 server + Windows 10.

What's the output of bazel info release?

Replace this line with your answer.

If bazel info release returns "development version" or "(@non-git)", tell us how you built Bazel.

release 3.7.0

What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?

NA its a release version

Have you found anything relevant by searching the web?

Not much apart from original discussions on the feature.

Any other information, logs, or outputs that you want to share?

Snippets from decoded--execution_log_binary_file

Build server

environment_variables {
name: "PATH"
value: "C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\Windows;C:\Windows\System32;C:\Windows\System32\WindowsPowerShell\v1.0"
}

Developer machine:

environment_variables {
name: "PATH"
value: "C:\Program Files\Git\bin;C:\Program Files\Git\usr\bin;C:\WINDOWS;C:\WINDOWS\System32;C:\WINDOWS\System32\WindowsPowerShell\v1.0"
}

@aiuto aiuto added area-Windows Windows-specific issues and feature requests team-Local-Exec Issues and PRs for the Execution (Local) team untriaged labels Mar 31, 2021
@meisterT meisterT added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website and removed team-Local-Exec Issues and PRs for the Execution (Local) team labels Jun 16, 2021
@matthewjh
Copy link

Can someone please take a look at this? Caught us out, too, as our CI and dev machines use different Windows versions.

@carpenterjc: what workaround are you using?

@fweikert fweikert added team-Performance Issues for Performance teams and removed team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website labels Jan 24, 2022
@meisterT meisterT added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website and removed team-Performance Issues for Performance teams labels Jan 26, 2022
@meteorcloudy meteorcloudy added P2 We'll consider working on this in future. (Assignee optional) help wanted Someone outside the Bazel team could own this and removed untriaged labels Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Windows Windows-specific issues and feature requests help wanted Someone outside the Bazel team could own this P2 We'll consider working on this in future. (Assignee optional) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: feature request
Projects
None yet
Development

No branches or pull requests

7 participants