Skip to content

feat(extensions): bump V2 Gunicorn dependencies - #1303

Open
alithethird wants to merge 51 commits into
canonical:mainfrom
alithethird:alithethird-scope-changes-to-v2
Open

feat(extensions): bump V2 Gunicorn dependencies#1303
alithethird wants to merge 51 commits into
canonical:mainfrom
alithethird:alithethird-scope-changes-to-v2

Conversation

@alithethird

Copy link
Copy Markdown
Contributor

Depends on #1259. This branch is based on Thanhphan1147:isd283-rockcraft-base.

Summary

  • use Gunicorn ~=26.0 for Flask and Django V2 extensions
  • use statsd exporter v0.30.0 for Flask and Django V2 extensions
  • preserve the existing V1 dependency versions

Testing

  • uv run pytest -q tests/unit/extensions/test_gunicorn.py::test_flask_extension_default tests/unit/extensions/test_gunicorn.py::test_flask_v2_full_apply_26_04 tests/unit/extensions/test_gunicorn.py::test_django_extension_default tests/unit/extensions/test_gunicorn.py::test_django_extension_v2_default

Thanhphan1147 and others added 30 commits June 17, 2026 17:42
…base class

Add shared infrastructure for V1/V2 extension routing:
- get_project_bases(): extracts base strings from yaml_data
- _FrameworkFactory: routes between V1/V2 extension classes

Part of ISD283 implementation.
Add GoFrameworkV2 (targets ubuntu@26.04, inherits GoFramework) and a GoFrameworkFactory that selects V1/V2 by base. Implements ISD283 Option 1 (factory function) for the go-framework extension.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…dispatch

Add SpringBootFrameworkV2 (targets ubuntu@26.04, inherits SpringBootFramework) and a SpringBootFrameworkFactory that selects V1/V2 by base. Implements ISD283 Option 1 (factory function) for the spring-boot-framework extension.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…atch

Add FastAPIFrameworkV2 (targets ubuntu@26.04, inherits FastAPIFramework) and a FastAPIFrameworkFactory that selects V1/V2 by base. Implements ISD283 Option 1 (factory function) for the fastapi-framework extension.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add DjangoFrameworkV2 (targets ubuntu@26.04, inherits DjangoFramework) and a DjangoFrameworkFactory that selects V1/V2 by base. Implements ISD283 Option 1 (factory function) for the django-framework extension.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add FlaskFrameworkV2 (targets ubuntu@26.04, inherits FlaskFramework) and a FlaskFrameworkFactory that selects V1/V2 by base. Implements ISD283 Option 1 (factory function) for the flask-framework extension.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…spatch

Add ExpressJSFrameworkV2 (targets ubuntu@26.04, inherits ExpressJSFramework) and an ExpressJSFrameworkFactory that selects V1/V2 by base. Implements ISD283 Option 1 (factory function) for the expressjs-framework extension.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 17, 2026 07:38

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 updates the 12-factor framework extensions to support V2 (ubuntu@26.04) via factory dispatch, and bumps the V2 Gunicorn + statsd_exporter versions for the Gunicorn-based frameworks (Flask/Django) while keeping V1 pinned to the existing versions.

Changes:

  • Introduce a shared _FrameworkFactory dispatcher and add V2 extension classes for multiple frameworks targeting ubuntu@26.04.
  • Bump Flask/Django V2 dependencies to gunicorn~=26.0 and statsd_exporter v0.30.0 (V1 remains gunicorn~=23.0 / v0.26.0).
  • Extend unit tests to cover factory dispatch, supported bases, and V2 application for ubuntu@26.04.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
rockcraft/extensions/extension.py Adds base normalization and _FrameworkFactory used to dispatch V1 vs V2 implementations.
rockcraft/extensions/gunicorn.py Parameterizes Gunicorn/statsd_exporter versions and introduces Flask/Django V2 + factories.
rockcraft/extensions/fastapi.py Adds FastAPI V2 class and factory.
rockcraft/extensions/go.py Adds Go V2 class and factory.
rockcraft/extensions/expressjs.py Adds ExpressJS V2 class and factory.
rockcraft/extensions/springboot.py Adds SpringBoot V2 class and factory.
rockcraft/extensions/init.py Registers framework factories as the default extension entrypoints.
tests/unit/extensions/test_gunicorn.py Updates registration to factories and adds Flask/Django factory + V2 apply tests.
tests/unit/extensions/test_fastapi.py Updates registration to factory and adds factory + V2 tests.
tests/unit/extensions/test_go.py Updates registration to factory and adds factory + V2 tests.
tests/unit/extensions/test_expressjs.py Updates registration to factory and adds factory + V2 apply test.
tests/unit/extensions/test_springboot.py Updates registration to factory and adds factory + V2 tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rockcraft/extensions/extension.py Outdated
Comment thread rockcraft/extensions/extension.py
Comment thread rockcraft/extensions/extension.py
Comment thread rockcraft/extensions/__init__.py Outdated
@alithethird
alithethird marked this pull request as ready for review July 22, 2026 04:40
@alithethird
alithethird requested a review from tigarmo as a code owner July 22, 2026 04:40
@alithethird

Copy link
Copy Markdown
Contributor Author

@tigarmo the pr is ready to review.

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.

3 participants