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

jupyter extension - allow configuration via env var #9615

Merged
merged 3 commits into from Mar 5, 2024
Merged

Conversation

kevyang
Copy link
Contributor

@kevyang kevyang commented Jan 3, 2024

Allow the Pachyderm Jupyter extension address and token to be configured via env var for compatibility with the Determined launcher.

INT-1149

@CLAassistant
Copy link

CLAassistant commented Jan 3, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Kevin Yang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@msteffen
Copy link
Contributor

Just noting here: we learned during testing today that the token in DEX_TOKEN is an OIDC ID token rather than a Pachyderm token, so it needs to be exchanged for a Pachyderm token during startup.

For reference, cust-eng made a version of that change here

@msteffen msteffen mentioned this pull request Jan 20, 2024
@kevyang kevyang requested a review from bbonenfant March 5, 2024 17:19
@kevyang kevyang marked this pull request as ready for review March 5, 2024 17:20
Copy link
Contributor

@emmajsadams emmajsadams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I investigate the sdk a bit and saw similar code self.auth_token = self.auth.authenticate(id_token=oidc_token) so I think this should work.

I did not pull it down to test though can do if you want me to.

else:
get_logger().debug(
"Could not find config file -- no pachyderm client instantiated"
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add any tests for this new fallback behavior? I think we avoided testing setup_handlers before since it was so simple, but maybe given these branching paths it could be worthwhile now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the sake of getting this into the release tomorrow, feel free to handle this in a follow up if you end up thinking it is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will file a ticket for this, i don't think it's very straightforward to toggle the env vars in our testing set up right now.

@kevyang kevyang merged commit c8ce580 into master Mar 5, 2024
11 of 12 checks passed
@kevyang kevyang deleted the kevyang/INT-1149 branch March 5, 2024 22:14
kevyang added a commit that referenced this pull request Mar 5, 2024
Allow the Pachyderm Jupyter extension address and token to be configured
via env var for compatibility with the Determined launcher.

[INT-1149](https://pachyderm.atlassian.net/browse/INT-1149)

[INT-1149]:
https://pachyderm.atlassian.net/browse/INT-1149?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: Kevin Yang <kevin.yang@hpe.com>
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.

None yet

4 participants