Skip to content

Keyring Forger #22370

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

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

Conversation

ndellosa95
Copy link
Contributor

@ndellosa95 ndellosa95 commented May 27, 2025

Closes #22172

I opened this draft PR to demonstrate some of the cyclical import issues with setting up a keyring subsystem in Pants. Namely, the need to build a pex and execute keyring before executing a pex CLI process. The logic here is based on my understanding of what @cburroughs wanted to do with keyring injection. This method has the advantage of always running the keyring process locally and then making the result available within whichever execution environment the CLI process using keyring is running. Though I'm a little fuzzy on how to distinguish between which execution environment each process should run in so this may not be implemented correctly.

There may not be a way to actually due what I'm doing here with running imports within the forge_keyring rule itself - the rule graph parsing currently fails for this module. I also am unaware of any syntax other than using a Get for instantiating a subsystem like this, or if such a thing is even possible with the call-by-name changes.

One alternative I had considered is just building the keyring binary with a recursive call within setup_pex_cli_process and avoiding everything associated with the pex.py module, and not having a keyring subsystem. However, then the binary would not be exportable, or we'd have to duplicate a bunch of already existing logic to make it so.

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.

Credential helpers
1 participant