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] - Improved checks on projectname during init stage #1416

Closed
kcpevey opened this issue Aug 23, 2022 · 5 comments
Closed

[ENH] - Improved checks on projectname during init stage #1416

kcpevey opened this issue Aug 23, 2022 · 5 comments

Comments

@kcpevey
Copy link
Contributor

kcpevey commented Aug 23, 2022

Feature description

My qhub projectname that I used when I ran qhub init included an underscore. This was the error that was generated when I went on to qhub deploy:

[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]: ╵
  1. the error comes from a subsequent step in the project (init vs deploy)
  2. the error mentions name but the variable that I set was projectname

These things make it misleading for users to debug.

I recommend that the init stage have a check to ensure that it passes the required restrictions and provides reasonable feedback when it doesn't

Value and/or benefit

users who are not confused at failures.

Anything else?

No response

@kcpevey
Copy link
Contributor Author

kcpevey commented Aug 23, 2022

Related: #1267

@trallard
Copy link
Member

@iameskild and @asmijafar20 this should be good to implement in the CLI work

@iameskild
Copy link
Member

Hi @trallard, this check has now be incorporated into the init command 🙌

@iameskild
Copy link
Member

iameskild commented Sep 22, 2022

This issue is a subset of the items that need to be validated when initializing the qhub-config.yaml.

See this issue for more details:
#1267

@iameskild
Copy link
Member

Completed as part of new Nebari CLI 🤘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants