continuous-integration icon indicating copy to clipboard operation
continuous-integration copied to clipboard

Don't modify the environment when executing a CI command

Open fmeum opened this issue 1 year ago • 3 comments

os.environ does not contain certain special environment variables on Windows (e.g. =C:) that are present when executing from cmd.exe.

fmeum avatar Nov 22 '24 10:11 fmeum

We probably cannot remove this, because we do set a bunch of env vars to pass information to the Bazel binary:

https://github.com/search?q=repo%3Abazelbuild%2Fcontinuous-integration+os.environ+path%3A%2F%5Ebuildkite%5C%2Fbazelci.py%2F&type=code

meteorcloudy avatar Nov 22 '24 10:11 meteorcloudy

But isn't the default to inherit the current process environment, which should be equivalent to passing os.environ except for filtering out these weird variables?

fmeum avatar Nov 22 '24 10:11 fmeum

Ah, that's a good point. I'll test this in our testing buildkite org.

Another concern is that this might mess up bisecting on windows, since the --client_env will shadow other failures.

meteorcloudy avatar Nov 22 '24 10:11 meteorcloudy