-
Notifications
You must be signed in to change notification settings - Fork 823
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
inject keyrings.google-artifactregistry-auth for private GCP PyPi registry #1772
Conversation
Tried with the following: where from metaflow import FlowSpec, step, pypi
class PetFlow(FlowSpec):
@pypi(python='3.10.13',
packages={'swagger-petstore-open-api-3-0-client': '1.0.11'})
@step
def start(self):
from swagger_petstore_open_api_3_0_client.api import pet
self.next(self.end)
@step
def end(self):
pass
if __name__ == '__main__':
PetFlow() with output of The generated But we still get the following issue:
|
@savingoyal @saikonen this fixes and I can confirm the PR works now...
while
output of |
@@ -258,6 +258,15 @@ def indices(self, prefix): | |||
return index, extras | |||
|
|||
def _call(self, prefix, args, env=None, isolated=True): | |||
# `--no-input` flag should not be passed when credentials |
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.
can you go into a bit more detail why removing the --no-input
was necessary? we don't want to require/enable any user interaction with the pip3 calls.
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.
Honestly, I am not sure. What I observed was that perhaps keyring tries to inject the creds dynamically using the json file passed to the env variable. And that apparently doesn't work when we use --no-input
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 will likely break the pypi solver. can we roll back this PR and discuss this issue?
@@ -254,6 +245,14 @@ def get_environment(self, step): | |||
msg += "step is not yet supported. Use one of @pypi or @conda only." | |||
raise CondaEnvironmentException(msg) | |||
|
|||
# Certain packages are required for metaflow runtime to function correctly. |
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.
does line 241:246 work as expected with this change?
Closes #1658
Present https://anaconda.org/conda-forge/keyrings.google-artifactregistry-auth
and on https://pypi.org/project/keyrings.google-artifactregistry-auth/