Run schema validation during `qhub init`
See original GitHub issueWe are currently only running schema validation when qhub render
is called. Let’s move this sort of validation as early in the process as we can.
Here is any example of the qhub init
passing but qhub render
failing a validation check that should be caught earlier in the process, as part of this failed gh action:
$ qhub init "do" --project "test--do-github-actions" --domain "do.qhub.dev" --auth-provider github --disable-prompt --ci-provider github-actions
$ qhub render -c "qhub-config.yaml" -o "qhub-do-github-actions-deployment"
Error: The schema validation of the qhub-config.yaml failed. The following error message may be helpful in determining what went wrong:
1 validation error for Main
project_name
In order to successfully deploy QHub, there are some project naming conventions which need
to be followed. First, ensure your name is compatible with the specific one for
your chosen Cloud provider. In addition, the QHub project name should also obey the following
format requirements:
- Letters from A to Z (upper and lower case) and numbers;
- Maximum accepted length of the name string is [16](https://github.com/Quansight/qhub/runs/6178700354?check_suite_focus=true#step:10:16) characters.
- If using AWS: names should not start with the string "aws";
- If using Azure: names should not contain "-".
Maximum accepted length of the project name string is 16 characters. (type=value_error)
Error: Process completed with exit code 1.
Related to #761
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Validation error after upgrade from 0.3.7 [bug] #593 - GitHub
Describe the bug I am running into an issue when deploying after upgrading ... using gitlab integration and the following error occurs: qhub....
Read more >How To Use Schema Validation in MongoDB - DigitalOcean
To assign a JSON Schema validator document to the peaks collection you created in the previous step, you could run the following command:....
Read more >Schema Validation — MongoDB Manual
Schema validation lets you create validation rules for your fields, such as allowed data types and value ranges. MongoDB uses a flexible schema...
Read more >Schema Validation in MongoDB Atlas - Topcoder
Schema validation is a key concept while developing any backend application. ... This will initialize the NPM in your current folder, ...
Read more >Schema Validation on Confluent Server
Schema Validation enables the broker to verify that data produced to a Kafka topic is using a valid schema ID in Schema Registry...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@iameskild @asmijafar20 is this being covered in your current PR?
In this PR, we are currently validating most of the inputs that are being passed in when running
nebari init ...
but there are a few more checks that should be added. Unfortunately most of the remaining checks are scattered throughoutqhub/initialize.py
and need to be moved toqhub/schema.py
.