12-factor plugin installs unnecessary package into charm's venv
Metadata
Current evaluation
The 12-factor plugin leaves unnecessary build dependencies in the charm virtual environment during packaging, remaining unaddressed with no comments after 62 days.
Suggested action: needs triage
Reason: The issue lacks labels, has zero maintainer comments, and has been inactive for ~2 months. Despite being well-structured with clear reproduction steps and a diff, it requires maintainer assessment to categorize, prioritize, and assign before any further action can be taken.
Staleness:
25
Complexity:
40
Confidence:
85
Support Request:
0
Issue body
### Check existing issues
- [x] I've verified that this bug isn't described by any existing issues.
### Bug description
Building a 12-factor charm (fastapi in this case), results in a larger venv than necessary.
My gut feeling is that the build dependencies are left in the venv, though some other deps are also there, which are not trivial to categorise.
### Steps to reproduce
### Charm
`charmcraft pack` this charm: https://github.com/canonical/roadmap.canonical.com/tree/main/charm
(or `juju download canonical-roadmap --channel latest/edge`)
unpack the charm
`ls venv/| sort > from-charmcraft-pack`
### What's required
Observe that https://github.com/canonical/roadmap.canonical.com/blob/main/charm/pyproject.toml doesn't list dependencies
Only https://github.com/canonical/roadmap.canonical.com/blob/main/charm/requirements.txt does
Create a new venv: `python3.12 -m venv test-paas` and activate
Install the deps: `pip install -r requirements.txt`
See what got installed: `ls test-paas/lib/python3.12/site-packages/| sort > from-paas-charm`
### Compare the two files:
```diff
(test-paas) ⋊> dima@bb ⋊> ~/tmp-rdm diff from-paas-charm from-charmcraft-pack 08:58:17
7c7,15
< cosl-1.9.1.dist-info
---
> cosl-1.6.1.dist-info
> _distutils_hack
> distutils-precedence.pth
> dns
> dnspython-2.8.0.dist-info
> email_validator
> email_validator-2.3.0.dist-info
> idna
> idna-3.11.dist-info
19c27
< opentelemetry_api-1.41.0.dist-info
---
> opentelemetry_api-1.40.0.dist-info
24c32,34
< paas_charm-1.11.1.dist-info
---
> paas_charm-1.11.0.dist-info
> packaging
> packaging-26.0.dist-info
26c36
< pip-24.0.dist-info
---
> pip-24.1.1.dist-info
36a47,48
> setuptools
> setuptools-82.0.1.dist-info
44a57,58
> wheel
> wheel-0.46.3.dist-info
48c62
< zipp-3.23.1.dist-info
---
> zipp-3.23.0.dist-info
```
There are two groups of extra deps:
- `packaging, setuptools, wheel` which appear to be build dependencies
- `_distutils_hack, distutils-precendence` which may also be
- `dns, dns_python, email_validator, idna` I guess `pydantic`'s extra?
### Environment
regular charmcraft pack
### charmcraft.yaml
```yaml
name: canonical-roadmap
type: charm
base: ubuntu@24.04
# the platforms this charm should be built on and run on.
# you can check your architecture with `dpkg --print-architecture`
platforms:
amd64:
# arm64:
# ppc64el:
# s390x:
summary: FastAPI web service of roadmap.canonical.com
description: |
Read more about the project on https://github.com/canonical/roadmap.canonical.com
extensions:
- fastapi-framework
requires:
postgresql:
interface: postgresql_client
optional: false
limit: 1
config:
options:
jira-url:
description: |
The base URL of the Jira instance.
default: "https://xxx.atlassian.net"
type: string
jira-username:
description: |
The username (email) used to authenticate with Jira.
type: string
jira-pat:
description: |
The Jira Personal Access Token used for authentication.
type: string
jql-filter:
description: |
Additional JQL filter appended to the dynamically built query.
Cycle labels are derived automatically from registered cycles
in the database — do NOT include "labels in (...)" here.
default: "issuetype = Epic"
type: string
oidc-client-id:
description: |
The OIDC client ID for authenticating users.
Leave empty to disable authentication.
type: string
oidc-client-secret:
description: |
The OIDC client secret.
type: string
oidc-issuer:
description: |
The OIDC issuer URL. Used for OpenID Connect discovery.
default: "https://iam.green.canonical.com"
type: string
oidc-redirect-uri:
description: |
The full callback URL for the OIDC redirect (e.g. https://roadmap.canonical.com/callback).
type: string
session-secret:
description: |
Secret key used to sign the session cookie.
Must be set to a stable random value for multi-replica deployments.
type: string
sync-interval-seconds:
description: |
Interval (in seconds) between automatic Jira syncs.
Set to 0 to disable the periodic sync entirely.
default: 3600
type: int
```
### Log output
```shell
N/A
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| 2026-06-15 12:00:51.784962+00:00 | qwen3.6-35b-a3b-mtp-q6 |
Staleness:
25
Complexity:
40
Confidence:
85
Support Request:
0
|
needs triage | The 12-factor plugin leaves unnecessary build dependencies in the charm virtual environment during packaging, remaining unaddressed with no comments after 62 days. |
| 2026-06-15 11:58:48.374441+00:00 | pending | — | — | — |