-
-
Notifications
You must be signed in to change notification settings - Fork 649
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
resolve pants plugins using direct pex
invocations
#21986
base: main
Are you sure you want to change the base?
resolve pants plugins using direct pex
invocations
#21986
Conversation
Back to draft while I figure out why this works locally but not in CI. |
Fixed that issue in CI. Ready for review again. |
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class PexCli(TemplatedExternalTool): |
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.
Moved this class to pex_cli_tool.py
so that plugin resolution could depend directly on the Pex download rules.
from pants.util.logging import LogLevel | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
@dataclass(frozen=True) |
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.
Vendored these two classes and function from VenvScriptWriter
to avoid the dependency on Python backend.
Does this PR introduce any numerical perf differences? |
I haven't measured yet since I'm still working through its correctness given the test failure in |
As part of implementing #21985 to reduce the scope of the bootstrap scheduler, modify the plugin resolution rules to invoke
pex
directly without using any of the Pex machinery in the Python backend (e.g.,CompletePexEnvironent
and other support classes). This should permit future work to remove the Python backend from the bootstrap scheduler.The plugin does consume a few subsystems from the Python backend for configuration, but no rule logic aside from the
PexCli
download logic which has been moved to its own file.The direct
pex
calls are based on the calls performed forVenvPex
-style internal venv pex files.