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

rule runner breaks if there are not defined, which can happen due to how pants isolates test env #13089

Merged
merged 2 commits into from
Oct 3, 2021

Conversation

asherf
Copy link
Member

@asherf asherf commented Oct 2, 2021

private link: https://app.circleci.com/pipelines/github/toolchainlabs/toolchain/37523/workflows/8b9bf63f-aaf9-4cb3-8945-f2aacce8cbc1/jobs/122624/tests#failed-test-0
Screen Shot 2021-10-02 at 4 55 24 PM

also tried to add those env variables to [subprocess-environment].env_vars but it didn't seem to help.
related to #13046
@stuhood

@asherf asherf requested a review from stuhood October 2, 2021 23:55
@asherf
Copy link
Member Author

asherf commented Oct 3, 2021

actually nvm, modifying pants.toml ([subprocess-environment].env_vars) fixes the issue.
so @stuhood feel free to close this PR.

@stuhood
Copy link
Sponsor Member

stuhood commented Oct 3, 2021

Mm: this is reasonable to land: thanks. This bit was really just intended as defense for our own usage, so not executing it outside of this repository is reasonable.

FWIW: the EXECUTION_SLOT is set dynamically by pytest in pantsbuild/pants due to: https://github.com/pantsbuild/pants/blob/main/pants.toml#L109. And HOME is passed through via:

pants/pants.toml

Lines 111 to 121 in 5086a78

[test]
extra_env_vars = [
# TODO: These are exposed to tests in order to allow for python interpreter discovery when
# Pants-tests-Pants: in particular, the [python-setup] subsystem consumes them.
# see https://github.com/pantsbuild/pants/issues/11638
"PYENV_ROOT",
"HOME",
"PATH",
# We'd always like complete backtraces in tests.
"RUST_BACKTRACE=1",
]

@stuhood stuhood merged commit 11904e8 into pantsbuild:main Oct 3, 2021
@asherf asherf deleted the fix branch October 3, 2021 05:41
@stuhood stuhood mentioned this pull request Oct 11, 2021
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