docs: 12 factor v2 - #2742
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces “V2” (Ubuntu 26.04) behavior for 12-factor app extensions (uv-based snippets, container/image naming changes) and updates docs/tests/templates to reflect the split between V1 and V2.
Changes:
- Add V1/V2 routing via framework “factory” objects and a shared
get_project_bases()helper for extension validation. - Expand test coverage for V2 extension outputs, experimental gating, and charm/reactive plugin base validation.
- Add staged 26.04 init templates and update documentation examples/UI (V1 vs V2 tabs).
Reviewed changes
Copilot reviewed 54 out of 55 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/models/test_project.py | Updates unit tests for charm/reactive plugin base validation with experimental gating. |
| tests/integration/sample-charms/platforms-noble-reactive/expected.yaml | Adjusts expected sample output base for reactive sample. |
| tests/integration/sample-charms/platforms-noble-reactive/charmcraft.yaml | Adjusts sample input base for reactive sample. |
| tests/integration/sample-charms/platforms-noble-charm/expected.yaml | Adds new sample expected output using the charm plugin. |
| tests/integration/sample-charms/platforms-noble-charm/charmcraft.yaml | Adds new sample charmcraft.yaml using the charm plugin. |
| tests/integration/invalid-charms/resolute-charm-plugin/errors.json | Updates expected validation error text for resolute charm-plugin invalid charm. |
| tests/integration/invalid-charms/multibase-resolute-charm-plugin/errors.json | Updates expected validation error text for multibase resolute charm-plugin invalid charm. |
| tests/integration/invalid-charms/multibase-charm-plugin/charmcraft.yaml | Removes resolute platform entry from multibase charm-plugin invalid charm. |
| tests/extensions/test_registry.py | Adds tests asserting framework factories’ supported bases and experimental status. |
| tests/extensions/test_app.py | Adds extensive tests for V2 snippets, routing, and experimental gating. |
| docs/howto/manage-web-app-charms/use-web-app-charm.rst | Splits troubleshooting commands into V1/V2 tab sets and updates container names. |
| docs/howto/manage-extensions.rst | Updates docs to present V1/V2 flows and adds V2 expand-extensions example output. |
| charmcraft/templates/init-spring-boot-framework/charmcraft.yaml.j2 | Updates template header links to new Charmcraft docs URL. |
| charmcraft/templates/init-spring-boot-framework-26.04/tox.ini.j2 | Adds staged tox template for 26.04 Spring Boot init profile. |
| charmcraft/templates/init-spring-boot-framework-26.04/src/charm.py.j2 | Adds staged 26.04 Spring Boot charm entrypoint. |
| charmcraft/templates/init-spring-boot-framework-26.04/pyproject.toml.j2 | Adds staged 26.04 Spring Boot pyproject configuration. |
| charmcraft/templates/init-spring-boot-framework-26.04/charmcraft.yaml.j2 | Adds staged 26.04 Spring Boot charmcraft.yaml template. |
| charmcraft/templates/init-spring-boot-framework-26.04/.gitignore.j2 | Adds staged 26.04 Spring Boot gitignore template. |
| charmcraft/templates/init-go-framework/charmcraft.yaml.j2 | Updates template header links to new Charmcraft docs URL. |
| charmcraft/templates/init-go-framework-26.04/tox.ini.j2 | Adds staged tox template for 26.04 Go init profile. |
| charmcraft/templates/init-go-framework-26.04/src/charm.py.j2 | Adds staged 26.04 Go charm entrypoint. |
| charmcraft/templates/init-go-framework-26.04/pyproject.toml.j2 | Adds staged 26.04 Go pyproject configuration. |
| charmcraft/templates/init-go-framework-26.04/charmcraft.yaml.j2 | Adds staged 26.04 Go charmcraft.yaml template. |
| charmcraft/templates/init-go-framework-26.04/.gitignore.j2 | Adds staged 26.04 Go gitignore template. |
| charmcraft/templates/init-flask-framework/charmcraft.yaml.j2 | Updates template header links to new Charmcraft docs URL. |
| charmcraft/templates/init-flask-framework-26.04/tox.ini.j2 | Adds staged tox template for 26.04 Flask init profile. |
| charmcraft/templates/init-flask-framework-26.04/src/charm.py.j2 | Adds staged 26.04 Flask charm entrypoint. |
| charmcraft/templates/init-flask-framework-26.04/pyproject.toml.j2 | Adds staged 26.04 Flask pyproject configuration. |
| charmcraft/templates/init-flask-framework-26.04/charmcraft.yaml.j2 | Adds staged 26.04 Flask charmcraft.yaml template. |
| charmcraft/templates/init-flask-framework-26.04/.gitignore.j2 | Adds staged 26.04 Flask gitignore template. |
| charmcraft/templates/init-fastapi-framework/charmcraft.yaml.j2 | Updates template header links to new Charmcraft docs URL. |
| charmcraft/templates/init-fastapi-framework-26.04/tox.ini.j2 | Adds staged tox template for 26.04 FastAPI init profile. |
| charmcraft/templates/init-fastapi-framework-26.04/src/charm.py.j2 | Adds staged 26.04 FastAPI charm entrypoint. |
| charmcraft/templates/init-fastapi-framework-26.04/pyproject.toml.j2 | Adds staged 26.04 FastAPI pyproject configuration. |
| charmcraft/templates/init-fastapi-framework-26.04/charmcraft.yaml.j2 | Adds staged 26.04 FastAPI charmcraft.yaml template. |
| charmcraft/templates/init-fastapi-framework-26.04/.gitignore.j2 | Adds staged 26.04 FastAPI gitignore template. |
| charmcraft/templates/init-expressjs-framework/charmcraft.yaml.j2 | Fixes template header whitespace and aligns docs URL/link formatting. |
| charmcraft/templates/init-expressjs-framework-26.04/tox.ini.j2 | Adds staged tox template for 26.04 ExpressJS init profile. |
| charmcraft/templates/init-expressjs-framework-26.04/src/charm.py.j2 | Adds staged 26.04 ExpressJS charm entrypoint. |
| charmcraft/templates/init-expressjs-framework-26.04/pyproject.toml.j2 | Adds staged 26.04 ExpressJS pyproject configuration. |
| charmcraft/templates/init-expressjs-framework-26.04/charmcraft.yaml.j2 | Adds staged 26.04 ExpressJS charmcraft.yaml template. |
| charmcraft/templates/init-expressjs-framework-26.04/.gitignore.j2 | Adds staged 26.04 ExpressJS gitignore template. |
| charmcraft/templates/init-django-framework/charmcraft.yaml.j2 | Updates template header links to new Charmcraft docs URL. |
| charmcraft/templates/init-django-framework-26.04/tox.ini.j2 | Adds staged tox template for 26.04 Django init profile. |
| charmcraft/templates/init-django-framework-26.04/src/charm.py.j2 | Adds staged 26.04 Django charm entrypoint. |
| charmcraft/templates/init-django-framework-26.04/pyproject.toml.j2 | Adds staged 26.04 Django pyproject configuration. |
| charmcraft/templates/init-django-framework-26.04/charmcraft.yaml.j2 | Adds staged 26.04 Django charmcraft.yaml template. |
| charmcraft/templates/init-django-framework-26.04/.gitignore.j2 | Adds staged 26.04 Django gitignore template. |
| charmcraft/models/project.py | Extends charm/reactive plugin base validation to include experimental bases. |
| charmcraft/extensions/extension.py | Extracts project base parsing into a shared helper and tweaks SinglePlatformExtension validation order. |
| charmcraft/extensions/app.py | Introduces V1/V2 extension classes plus a factory router, and adds a V2 uv-based snippet generator. |
| charmcraft/extensions/init.py | Registers framework factories in place of raw Extension classes. |
| charmcraft/const.py | Splits stable vs experimental base allowlists for charm/reactive plugins. |
| charmcraft/application/main.py | Adjusts app plugin availability based on experimental base allowlists. |
| charmcraft/application/commands/init.py | Notes that 26.04 templates are staged but not yet wired into PROFILES. |
Signed-off-by: Ali UĞUR <39213991+alithethird@users.noreply.github.com>
… use-web-app-charm.rst
|
hi @medubelko ! Sorry for the delay, the docs are compiling now :D |
erinecon
left a comment
There was a problem hiding this comment.
Thanks for including documentation in this PR 🎉 a couple of suggestions and an open question
…ize container names in logs
erinecon
left a comment
There was a problem hiding this comment.
Thanks for incorporating my feedback! All the content looks correct and renders as expected. I have some nits on the banner content and suggested some metadata descriptions for the pages we're updating.
Co-authored-by: Erin Conley <erin.conley@canonical.com> Signed-off-by: Ali UĞUR <39213991+alithethird@users.noreply.github.com>
erinecon
left a comment
There was a problem hiding this comment.
Docs changes look good to me -- thanks! Pending review from @medubelko
|
We will follow up on this PR with ISD-6189 to refactor the nested tabbed environments. |
|
FYI @erinecon, #2754 includes some doc updates related to the v2 profiles. Discussed with @alithethird |
Describe your changes.
make lint && make test.