question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Run schema validation during `qhub init`

See original GitHub issue

We 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:open
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
trallardcommented, Sep 22, 2022

@iameskild @asmijafar20 is this being covered in your current PR?

0reactions
iameskildcommented, Sep 22, 2022

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 throughout qhub/initialize.py and need to be moved to qhub/schema.py.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found