Skip to content

docs: 12 factor v2 - #2742

Merged
erinecon merged 46 commits into
canonical:mainfrom
alithethird:docs/12-factor-v2
Jul 21, 2026
Merged

docs: 12 factor v2#2742
erinecon merged 46 commits into
canonical:mainfrom
alithethird:docs/12-factor-v2

Conversation

@alithethird

Copy link
Copy Markdown
Contributor

Describe your changes.


  • I've followed the contribution guidelines.
  • I've signed the CLA.
  • I've successfully run make lint && make test.
  • I've added or updated any relevant documentation.
  • In documents I changed, I added a meta description if one was missing.
  • I've updated the relevant release notes.

Copilot AI review requested due to automatic review settings June 24, 2026 06:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread charmcraft/templates/init-go-framework-26.04/tox.ini.j2
Comment thread charmcraft/templates/init-flask-framework-26.04/tox.ini.j2
Comment thread charmcraft/templates/init-django-framework-26.04/tox.ini.j2
Comment thread charmcraft/templates/init-fastapi-framework-26.04/tox.ini.j2
Comment thread charmcraft/templates/init-expressjs-framework-26.04/tox.ini.j2
Comment thread charmcraft/models/project.py
Comment thread docs/howto/manage-extensions.rst Outdated
Comment thread docs/howto/manage-extensions.rst Outdated
Comment thread docs/howto/manage-extensions.rst Outdated
Comment thread docs/howto/manage-extensions.rst Outdated
@alithethird
alithethird marked this pull request as ready for review June 30, 2026 13:55
@alithethird alithethird changed the title Docs/12 factor v2 Docs: 12 factor v2 Jul 6, 2026
@alithethird

Copy link
Copy Markdown
Contributor Author

hi @medubelko ! Sorry for the delay, the docs are compiling now :D

@erinecon erinecon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for including documentation in this PR 🎉 a couple of suggestions and an open question

Comment thread docs/howto/manage-web-app-charms/use-web-app-charm.rst Outdated
Comment thread docs/howto/manage-web-app-charms/use-web-app-charm.rst Outdated
Comment thread docs/howto/manage-web-app-charms/use-web-app-charm.rst Outdated
Comment thread docs/howto/manage-web-app-charms/use-web-app-charm.rst

@erinecon erinecon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/howto/manage-web-app-charms/use-web-app-charm.rst
Comment thread docs/howto/manage-web-app-charms/use-web-app-charm.rst Outdated
Comment thread docs/howto/manage-extensions.rst Outdated
Comment thread docs/howto/manage-web-app-charms/use-web-app-charm.rst Outdated
Comment thread docs/howto/manage-extensions.rst Outdated
Comment thread docs/howto/manage-web-app-charms/use-web-app-charm.rst
Comment thread docs/howto/manage-extensions.rst
Comment thread docs/howto/manage-extensions.rst Outdated

@erinecon erinecon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs changes look good to me -- thanks! Pending review from @medubelko

@erinecon erinecon changed the title Docs: 12 factor v2 docs: 12 factor v2 Jul 21, 2026
@erinecon
erinecon merged commit 91f9fc0 into canonical:main Jul 21, 2026
19 of 21 checks passed
@erinecon

Copy link
Copy Markdown
Collaborator

We will follow up on this PR with ISD-6189 to refactor the nested tabbed environments.

@dwilding

Copy link
Copy Markdown
Contributor

FYI @erinecon, #2754 includes some doc updates related to the v2 profiles. Discussed with @alithethird

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants