← Back to issue list

feat(extensions): extension dispatch for 12-factor extensions.

View original Github issue

Metadata

Project
rockcraft
Number
#1259
Type
pull request
State
merged
Author
Thanhphan1147
Labels
—
Created
Updated
Closed

Current evaluation

Merged as commit 644c6950, adding _FrameworkFactory dispatch plus V2 extension classes (Flask, Django, FastAPI, ExpressJS, SpringBoot) targeting ubuntu@26.04; extended later by #1320/#1332/#1345/#1364.

Resolution: closed resolved

Reason: PR #1259 was approved and merged into Rockcraft's mainline as commit 644c6950 ('feat(extensions): extension dispatch for 12-factor extensions. (#1259)'). The `_FrameworkFactory` class in rockcraft/extensions/extension.py now routes each framework extension to its V1 or V2 class based on the project base, and follow-up PRs (#1320 bare bases, #1332 writable app data, #1345 part-name separators, #1364 26.04 base templates) build directly on this dispatch.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Add V2 extension classes and factory dispatch for all 12-factor frameworks (Flask, Django, FastAPI, ExpressJS, SpringBoot). ## What this PR does - `get_project_bases(yaml_data)`: extracts base strings from project YAML - `_FrameworkFactory`: routes between V1/V2 extension classes based on the project's target bases - `FlaskFrameworkV2` / `FlaskFrameworkFactory` — targets `ubuntu@26.04`, experimental - `DjangoFrameworkV2` / `DjangoFrameworkFactory` — targets `ubuntu@26.04`, experimental - `FastAPIFrameworkV2` / `FastAPIFrameworkFactory` — targets `ubuntu@26.04`, experimental - `ExpressJSFrameworkV2` / `ExpressJSFrameworkFactory` — targets `ubuntu@26.04`, experimental - `SpringBootFrameworkV2` / `SpringBootFrameworkFactory` — targets `ubuntu@26.04`, experimental Each V2 class is behaviourally identical to its V1 counterpart for now; it exists so that a future paas-charm 2.0 implementation can be dispatched transparently based on the rock's target base. - [x] I've followed the [contribution guidelines](https://github.com/canonical/rockcraft/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`.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged as commit 644c6950, adding _FrameworkFactory dispatch plus V2 extension classes (Flask, Django, FastAPI, ExpressJS, SpringBoot) targeting ubuntu@26.04; extended later by #1320/#1332/#1345/#1364.
stealth/space-bunny-alpha — closed resolved Merged into Rockcraft via commit 644c6950 (PR #1259), adding base-aware V2 framework dispatch for Flask, Django, FastAPI, ExpressJS and SpringBoot extensions.
qwen/qwen3.6-35b-a3b — — Merged after fixing CI failures and review feedback. Adds V2 extension classes and factory dispatch for all 12-factor frameworks targeting ubuntu@26.04. Prepares for transparent paas-charm 2.0 dispatch while preserving V1 behavior.
qwen3.6-35b-a3b-mtp-q6
Staleness: 5
Complexity: 40
Confidence: 90
needs review Introduces V2 extension classes and a factory dispatch mechanism for Flask, Django, FastAPI, ExpressJS, and SpringBoot targeting ubuntu@26.04. Currently behaviorally identical to V1 to enable future transparent dispatch. PR is ready for maintainer review.

Update history

Date Change
updated
updated
updated
updated
updated
updated
updated
updated

Related work

  • Likely Fixed By: rockcraft#1320 (confidence 88%)

    Follow-up 'feat(extensions): support bare bases in V2 frameworks' extending the V2 classes introduced by the merged dispatch

  • Likely Fixed By: rockcraft#1332 (confidence 85%)

    Follow-up 'feat(extensions): add writable app data for v2 frameworks' building on the AppDataDirMixin/V2 classes from #1259

  • Related To: rockcraft#1364 (confidence 70%)

    Adds Ubuntu 26.04 base templates, the target base the V2 extensions registered in #1259 declare support for

Related issues

Issue Project State Summary Similarity
#1254 feat(extensions): add Flask framework V2 extension and factory dispatch rockcraft closed PR closed as redundant: the author moved the FlaskFrameworkV2 and FlaskFrameworkFactory changes into base PR #1259, which merged as commit 644c6950 ('feat(extensions): extension dispatch for 12-factor extensions'), covering all five framework V2 extensions.
86%
#1255 feat(extensions): add Django framework V2 extension and factory dispatch rockcraft closed PR closed as redundant: its Django V2 extension and factory dispatch changes were folded into base PR #1259, which merged to main as commit 644c6950 (feat(extensions): extension dispatch for 12-factor extensions).
81%
#1256 feat(extensions): add FastAPI framework V2 extension and factory dispatch rockcraft closed FastAPI V2 and factory-dispatch work was folded into #1259 and merged as 644c6950; standalone PR #1256 was closed to reduce review overhead.
77%
#1258 feat(extensions): add SpringBoot framework V2 extension and factory dispatch rockcraft closed PR closed unmerged: author moved the SpringBootFrameworkV2 + SpringBootFrameworkFactory dispatch changes into base PR #1259, which was merged in commit 644c6950 covering V2 dispatch for 12-factor extensions.
76%
#1257 feat(extensions): add ExpressJS framework V2 extension and factory dispatch rockcraft closed ExpressJS V2 extension + factory dispatch were folded into base PR #1259, merged as commit 644c6950; this PR was closed as redundant.
74%
#2722 Feat: extension dispatch for 12-factor extensions. charmcraft merged Merged as commit 6aca1903: adds extension dispatch for 12-factor extensions (+2528/-149, 53 files), approved by 2 reviewers after being held for the 4.3.0 release; later aligned in #2884 and #2825.
72%
#1320 feat(extensions): support bare bases in V2 frameworks rockcraft merged Merged #1320, adding bare-base support for FastAPI, Go, Flask, Django, and Spring Boot V2 extensions with tests for Ubuntu 24.04/V1 and 26.04/V2 selection.
71%
#1251 feat(extensions): add Go framework V2 extension and factory dispatch rockcraft closed GoFrameworkV2 and factory dispatch moved into canonical/rockcraft#1259, which merged as commit 644c6950; #1251 was closed as superseded.
71%