← Back to issue list

Add fastapi init profile and fastapi-framework extension

View original Github issue

Metadata

Project
rockcraft
Number
#692
Type
pull request
State
merged
Author
javierdelapuente
Labels
Created
Updated
Closed

Current evaluation

Merged. Implemented ISD160 spec by adding a FastAPI init profile and extension to rockcraft. Features ASGI support with uvicorn, targets Ubuntu 24.04, and uses a standalone architecture. Approved and passed CI.

Suggested action:

No scores available.

Issue body

- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? ----- This PR implements the spec ISD160 - 12-Factor FastAPI Support" for rockcraft. For that, a new init profile called "fastapi-framework" and a new fastapi extension, called "fastapi-framework" are needed. These additions are similar to the flask and django init profiles and extensions, with several differences. Some of the main differences are: FastAPI and starlette supported. The ASGI entrypoint location can be in serveral places (and it is ASGI instead of WSGI). No dependency on gunicorn. FastAPI works with uvicorn without a configuration file. No statsd. Ubuntu 24.04 by default (supported bases 24.04 and bare). All current extensions (go, django, flask and now fastapi), have similarities (at the end they extend/change the rockcraft.yaml file), but also many subtle different details, like how they service command is overridden, extra tools or frameworks, what can be overridden and how, extra env variables (only Go).... As so, I have decided to not try to use a common base class for all of them (allowing them to easily evolve independently without a coupled inheritance structure). This is a tradeoff, as code is similar between frameworks. This is open for discussion.

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged. Implemented ISD160 spec by adding a FastAPI init profile and extension to rockcraft. Features ASGI support with uvicorn, targets Ubuntu 24.04, and uses a standalone architecture. Approved and passed CI.
qwen3.6-35b-a3b-mtp-q6 Merged external contribution adding a FastAPI init profile and extension to rockcraft. Implements ISD160 spec with ASGI/uvicorn, Ubuntu 24.04 defaults, and avoids a shared base class for independent evolution.
qwen3.6-35b-a3b-mtp-q6 Merged. Added a FastAPI init profile and extension to Rockcraft, implementing ISD160. Supports FastAPI/Starlette with ASGI and uvicorn, targets Ubuntu 24.04, and avoids a shared base class for independent framework evolution.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1868 feat: fastapi-framework init profile and extension charmcraft merged Merged. Adds the fastapi-framework init profile and extension to charmcraft, implementing the ISD160 spec with base 24.04. Includes updated tests for flask, fastapi, and go frameworks. Approved by three reviewers.
80%
#631 Add go init profile and go-extension rockcraft merged Merged following three approvals and passing CI. Introduces the go-framework init profile and extension for rockcraft, implementing ISD153 12-Factor Go Support. Base platforms were narrowed to amd64, and flask/django extensions were updated for parity.
73%