feat: paas-config.yaml validation
Metadata
Current evaluation
Merged in #2596 via commit f1df851b, adding paas-config.yaml checks to reject invalid YAML and unsupported JSON framework logging formats during packing.
Resolution: closed resolved
Reason: PR #2596 was approved and merged as commit f1df851b. The validation runs through extension configuration during charmcraft pack.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The 12-factor tooling accepts a configuration file `paas-config.yaml` that is read by the
`paas-charm` library. See https://canonical-12-factor-app-support.readthedocs-hosted.com/latest/reference/paas-config/
This file is written in `yaml` format, and currently it contains functionality about Prometheus scraping configuration and [logging formatting in the frameworks](https://canonical-12-factor-app-support.readthedocs-hosted.com/latest/reference/paas-config-structured-logging/).
If the file is not correct, because it is not valid `yaml` or 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 pack` fail if the `paas-config.yaml` is not correct `yaml`. It will also fail if the `framework_logging_format` is set to `json` for 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).
---
- [x] I've followed the [contribution guidelines](https://github.com/canonical/charmcraft/blob/main/CONTRIBUTING.md).
- [x] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/).
- [x] I've successfully run `make lint && make test`.
- [x] I've added or updated any relevant documentation.
- [ ] I've updated the relevant release notes.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in #2596 via commit f1df851b, adding paas-config.yaml checks to reject invalid YAML and unsupported JSON framework logging formats during packing. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2596 as commit f1df851b, adding paas-config.yaml validation that rejects invalid YAML and unsupported framework_logging_format=json values during packing. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2596 (f1df851b) added paas-config.yaml validation, making charmcraft pack reject invalid YAML and unsupported JSON logging formats. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged validation for paas-config.yaml in charmcraft pack. The update ensures builds fail on invalid YAML or unsupported json logging formats, improving error feedback. Approved by reviewers and integrated. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged validation for paas-config.yaml in charmcraft pack. The change fails the build on invalid YAML or unsupported json logging formats, improving developer feedback. Reviewers noted unrelated test failures were not blocking. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
15
Complexity:
35
Confidence:
80
|
needs review | Adds validation for paas-config.yaml during charmcraft pack, failing on invalid YAML or unsupported JSON logging formats. Currently awaiting maintainer review after recent contributor pings. |
Update history
No update history recorded yet.
Related work
-
Related To:
charmcraft#2825
(confidence 99%)
Commit 89b8168b later expanded validation to paas-config.yaml metrics_path, port, and metrics-port formats.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2825 feat(paas): add validation for paas-config.yaml and metrics_path format | charmcraft | merged | Merged as commit 89b8168b, adding 12-factor paas-config.yaml validation requiring metrics-path to be a string and a URL path beginning with '/'. |