Skip to content

store, and switch back to the original user when deploying on a gcp cluster#125

Merged
shaneknapp merged 3 commits intoberkeley-dsep-infra:mainfrom
shaneknapp:switch-back-to-primary-account-after-run
May 6, 2025
Merged

store, and switch back to the original user when deploying on a gcp cluster#125
shaneknapp merged 3 commits intoberkeley-dsep-infra:mainfrom
shaneknapp:switch-back-to-primary-account-after-run

Conversation

@shaneknapp
Copy link
Contributor

@shaneknapp shaneknapp commented Apr 25, 2025

here's how it looks when run locally:

$ hubploy --verbose deploy jupyter hub staging
INFO:hubploy.__main__:Namespace(command='deploy', debug=False, helm_debug=False, verbose=True, deployment='jupyter', chart='hub', environment='staging', namespace=None, set=None, set_string=None, version=None, timeout=None, force=False, atomic=False, cleanup_on_fail=False, dry_run=False, image_overrides=None)

<SNIP some output>

INFO:hubploy.auth:Attempting to authenticate with gcloud...
INFO:hubploy.auth:Saving current gcloud login
INFO:hubploy.auth:Current gcloud login: <my gcloud login address redacted>
INFO:hubploy.auth:Decrypting deployments/jupyter/secrets/gke-key.json

<SNIP more output>

REVISION: 21
TEST SUITE: None
INFO:hubploy.auth:Reverting gcloud login to <my gcloud login address redacted>
Updated property [core/account].
$ gcloud auth list --filter=status:ACTIVE --format="value(account)"
<my gcloud login address redacted>

@shaneknapp
Copy link
Contributor Author

shaneknapp commented Apr 25, 2025

seems to work... i might refactor this a bit before merging tho

https://github.com/cal-icor/cal-icor-hubs/actions/runs/14674155782/job/41187164639#step:11:1

@shaneknapp shaneknapp changed the title beta test of storing the original user and switch back post-run store, and switch back to the original user when deploying on a gcp cluster Apr 25, 2025
@shaneknapp shaneknapp requested a review from felder April 25, 2025 22:35
yield current_login


@contextmanager
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 don't believe that i need to use this decorator... but i'm unsure and not an expert in this bit of python. :)

@shaneknapp shaneknapp merged commit b6ee8e6 into berkeley-dsep-infra:main May 6, 2025
1 check passed
@shaneknapp shaneknapp deleted the switch-back-to-primary-account-after-run branch May 6, 2025 19:36
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.

2 participants