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

[ENH] - Additional checks for the cli init stage #1399

Closed
kcpevey opened this issue Aug 17, 2022 · 1 comment
Closed

[ENH] - Additional checks for the cli init stage #1399

kcpevey opened this issue Aug 17, 2022 · 1 comment
Labels
area:developer-experience 👩🏻‍💻 needs: discussion 💬 Needs discussion with the rest of the team type: duplicate 👯‍♀️ This issue or PR already exists type: enhancement 💅🏼 New feature or request

Comments

@kcpevey
Copy link
Contributor

kcpevey commented Aug 17, 2022

Feature description

During the qhub init I used a projectname that had an underscore. I believe it wasn't until I got to the deploy stage that I saw a failure:

[terraform]: │ Error: "name" can only contain lowercase letters, numbers and hyphens
[terraform]: │
[terraform]: │   with module.kubernetes.google_container_cluster.main,
[terraform]: │   on modules/kubernetes/main.tf line 5, in resource "google_container_cluster" "main":
[terraform]: │    5:   name     = var.name
[terraform]: │
[terraform]: ╵
[terraform]: ╷
[terraform]: │ Error: "account_id" ("this_deployment-dev") doesn't match regexp "^[a-z](?:[-a-z0-9]{4,28}[a-z0-9])$"
[terraform]: │
[terraform]: │   with module.kubernetes.google_service_account.main,
[terraform]: │   on modules/kubernetes/service_account.tf line 2, in resource "google_service_account" "main":
[terraform]: │    2:   account_id   = var.name
[terraform]: │
[terraform]: ╵

The error message Error: "name" can only contain lowercase letters, numbers and hyphens is what we were hitting, but this originated from the projectname flag passed to qhub init so its very hard for an end user to comprehend how to resolve this.

I recommend we do the checks from the above errors ("lowercase letters, numbers and hyphens" and regexp "^a-z$") during the init stage so we can give users helpful error messages.

Value and/or benefit

Users are given clearer error messaging.

Anything else?

No response

@trallard trallard added type: enhancement 💅🏼 New feature or request area:developer-experience 👩🏻‍💻 needs: discussion 💬 Needs discussion with the rest of the team labels Aug 31, 2022
@trallard
Copy link
Member

trallard commented Oct 4, 2022

This is a duplicate of #1416 - closing in favour of that one

@trallard trallard closed this as completed Oct 4, 2022
@trallard trallard added the type: duplicate 👯‍♀️ This issue or PR already exists label Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:developer-experience 👩🏻‍💻 needs: discussion 💬 Needs discussion with the rest of the team type: duplicate 👯‍♀️ This issue or PR already exists type: enhancement 💅🏼 New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants