nebari
nebari copied to clipboard
[ENH] - Improved checks on projectname during init stage
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]: âĩ
- the error comes from a subsequent step in the project (
init
vsdeploy
) - the error mentions
name
but the variable that I set wasprojectname
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
Related: https://github.com/Quansight/qhub/issues/1267
@iameskild and @asmijafar20 this should be good to implement in the CLI work
Hi @trallard, this check has now be incorporated into the init
command ð
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: https://github.com/Quansight/qhub/issues/1267
Completed as part of new Nebari CLI ðĪ