feat: paas-config.yaml validation#2596
Open
javierdelapuente wants to merge 1 commit intocanonical:mainfrom
Open
feat: paas-config.yaml validation#2596javierdelapuente wants to merge 1 commit intocanonical:mainfrom
javierdelapuente wants to merge 1 commit intocanonical:mainfrom
Conversation
afad506 to
104c927
Compare
Contributor
Author
|
@lengau can you have a look at this PR? Thanks! |
c98792b to
41b4ea4
Compare
41b4ea4 to
8e6996d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 12-factor tooling accepts a configuration file
paas-config.yamlthat is read by thepaas-charmlibrary. See https://canonical-12-factor-app-support.readthedocs-hosted.com/latest/reference/paas-config/This file is written in
yamlformat, and currently it contains functionality about Prometheus scraping configuration and logging formatting in the frameworks.If the file is not correct, because it is not valid
yamlor because the keys/values are wrong, the application will get into error state, as it is invalid and the file has to be fixed and the charm packed again.To improve the feedback loop, this PR will make the
charmcraft packfail if thepaas-config.yamlis not correctyaml. It will also fail if theframework_logging_formatis set tojsonfor any of the frameworks where it is not supported (only Gunicorn and Uvicorn based frameworks support this option, as the other frameworks can be easily configured in the charmed application).make lint && make test.