-
-
Notifications
You must be signed in to change notification settings - Fork 647
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
Remove deprecated default ICs. #18627
Conversation
I acknowledge that the hack in setup.py is unpleasant, but the alternative is impractical right now. I can chip away at the relevant tests over time. |
# TODO: This is a hacky affordance for Pants's own tests, dozens of which were | ||
# written when Pants provided default ICs, and implicitly rely on that assumption. | ||
# We'll probably want to find and modify all those tests to set an explicit IC, but | ||
# that will take time. | ||
if "PYTEST_CURRENT_TEST" in os.environ: | ||
return (">=3.7,<4",) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you could include another (longer) deprecation here, to commit us to doing that on some timeframe? Maybe 4 releases or something.
# The python backend requires setting ICs explicitly. | ||
# We do this centrally here for convenience. | ||
if any("pants.backend.python" in arg for arg in command) and not any( | ||
"--python-interpreter-constraints" in arg for arg in command | ||
): | ||
args.append("--python-interpreter-constraints=['>=3.7,<4']") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto a deprecation here? Or are there too many callsites to actually fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is too hacky not to fix, but it will take time. I'll try and see how many tests are affected.
Subsequent PRs will apply this in relevant tests, so we can remove one of the hacks introduced in #18627. I have applied this to several tests and verified that it works.
This is a step towards getting rid of the IC-setting hack introduced in pantsbuild#18627.
This is a step towards getting rid of the IC-setting hack introduced in pantsbuild#18627.
This is a step towards getting rid of the IC-setting hack introduced in #18627. This is a very mechanical change that replaced uses of RuleRunner with PythonRuleRunner. There is also one change to a test timeout. This is not exhaustive - there are other tests that will need similar treatment before we can rid of the hack.
This bumps up the timeouts of several tests that are regularly causing spurious failures: 1. `src/python/pants/init/load_backends_integration_test.py` 2. `src/python/pants/base/specs_integration_test.py` 3. `src/python/pants/backend/python/goals/coverage_py_integration_test.py` The most common of these is 1, especially for cherry-picks to 2.16. For instance, #18832 required 8 re-attempts, #18839 required 5 and #18850 got to 13. Given these seem to affect 2.16 cherry-picks so much, I'm thinking it makes sense to cherry pick this back to that branch too, along with the increase in #18847, and part of #18627 (the increase to `src/python/pants/engine/streaming_workunit_handler_integration_test.py`).
This bumps up the timeouts of several tests that are regularly causing spurious failures: 1. `src/python/pants/init/load_backends_integration_test.py` 2. `src/python/pants/base/specs_integration_test.py` 3. `src/python/pants/backend/python/goals/coverage_py_integration_test.py` The most common of these is 1, especially for cherry-picks to 2.16. For instance, pantsbuild#18832 required 8 re-attempts, pantsbuild#18839 required 5 and pantsbuild#18850 got to 13. Given these seem to affect 2.16 cherry-picks so much, I'm thinking it makes sense to cherry pick this back to that branch too, along with the increase in pantsbuild#18847, and part of pantsbuild#18627 (the increase to `src/python/pants/engine/streaming_workunit_handler_integration_test.py`).
#18859) This cherry-picks a bunch of test timeout increases from main to 2.16.x, to reduce the number of spurious re-attempts required for other cherry-picks. Fully cherry-picked: #18847, #18857 Partially cherry-picked (just the timeout increases): #18627, #18712. Motivation: when cherry-picking, #18832 required 8 re-attempts, #18839 required 5 and #18850 got to 13, almost all due to tests timing out. Various other cherry-picks likely required many re-attempts too. --------- Co-authored-by: Asher Foa <asher@toolchain.com>
Moves us towards getting rid of the hacky affordance introduced in pantsbuild#18627.
Moves us towards getting rid of the hacky affordance introduced in #18627.
Now every repo must explicitly specify ICs.