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

Fix failed Dask worker pod launch due to invalid username characters #928

Merged
merged 2 commits into from
Jun 24, 2022

Conversation

jmettes
Copy link
Member

@jmettes jmettes commented Jun 24, 2022

Since we've moved to using email addresses in Cognito, this code is now passing @ symbols into the Kubernetes worker pod and causing it to fail to create.

Failed to create pod in namespace sandbox - Pod "dask-worker-935744a16ab74944bff079717a6a5ba0-ls628" is invalid: metadata.labels: Invalid value: "jonathan.mettes@ga.gov.au": a valid label must be an empty string or consist of alphanumeric characters, '-', '' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9.]*)?[A-Za-z0-9])?')

Restrict jupyterhub_user parameter to alphanumeric characters.

@jmettes jmettes requested review from emmaai and robbibt June 24, 2022 02:39
Copy link
Member

@robbibt robbibt left a comment

Choose a reason for hiding this comment

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

Awesome! I also hijacked this PR to add the code to automatically close any existing clusters

Copy link
Contributor

@emmaai emmaai left a comment

Choose a reason for hiding this comment

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

tyty Jonathan!

@emmaai emmaai merged commit 654b252 into develop Jun 24, 2022
@emmaai emmaai deleted the fix-jupyterhub-username-dask-label branch June 24, 2022 05:07
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.

3 participants