feat(profiles): bound dependencies, remove uv.lock files, improve init output
Metadata
Current evaluation
Merged PR #2754 (0be5a5e7), bounding Kubernetes/machine dependencies, removing bundled uv.lock files, and improving init output and docs; fixes #2749.
Resolution: closed resolved
Reason: PR #2754 was merged as commit 0be5a5e7, removing uv.lock from the Kubernetes and machine profiles and directing users to run uv lock. The issue tracker confirms #2749 was closed as fixed by this PR.
Evaluated by: mr-cal-bot
No scores available.
Issue body
This PR makes several changes related to profiles. Fixes #2749.
---
1. For the `kubernetes` and `machine` profiles, bound all dependencies so that (on user update) they stay within the same major version. The minimum version of each dependency is the latest tested major.minor version. See:
- `charmcraft/templates/init-kubernetes/pyproject.toml.j2`
- `charmcraft/templates/init-machine/pyproject.toml.j2`
---
2. Remove `uv.lock` from the `kubernetes` and `machine` profiles. After internal discussion, we feel it makes more sense for the user to lock and ensure they have up-to-date dependencies, rather than us continually bumping the template lockfiles.
After making this change, I updated the Spread tests as thoroughly as I could.
---
3. Make the output of `charmcraft init` better match the requested profile:
- The summary of created files is now correct for each type of profile. E.g., for `flask-framework` the summary lists `requirements.txt`; for `test-kubernetes` the summary only lists Spread-related files.
- For profiles that use uv to manage dependencies, include a message that explains about running `uv lock`. This applies to `kubernetes`, `machine`, and the upcoming 26.04 12-factor profiles. It doesn't apply to the existing 12-factor profiles.
**Example for `kubernetes`**
```text
$ charmcraft init
Created project files for your charm:
charmcraft.yaml
pyproject.toml
README.md
src/charm.py
src/myapp.py
...
To manage your charm's dependencies, use uv.
To migrate from the Charm plugin to the uv plugin, see:
https://canonical.com/juju/docs/charmcraft/stable/howto/migrate-plugins/charm-to-uv/
Next steps:
1. Run 'uv lock'
2. Edit charmcraft.yaml and pyproject.toml to provide metadata, then commit (including uv.lock)
3. Write your charm code and tests
```
**Example for `flask-framework`**
```text
$ charmcraft init --profile flask-framework
Created project files for your charm:
charmcraft.yaml
pyproject.toml
requirements.txt
src/charm.py
...
```
---
4. Updated `init` examples in the documentation:
- [Manage charms > Initialise a charm](https://canonical-charmcraft--2754.com.readthedocs.build/2754/howto/manage-charms/#initialise-a-charm) (expand "Example session")
- [Manage extensions > View details about the extension in use](https://canonical.com/juju/docs/charmcraft/4.3/howto/manage-extensions/#view-details-about-the-extension-in-use) (expand "Example")
---
5. Updated file reference docs to present uv-managed charms as the default, which will automatically cover the 26.04 12-factor profiles when they are released. The existing 12-factor profiles are called out as an exception.
- [`pyproject.toml` file](https://canonical-charmcraft--2754.com.readthedocs.build/2754/reference/files/pyproject-toml-file/)
- [`requirements.txt` file](https://canonical-charmcraft--2754.com.readthedocs.build/2754/reference/files/requirements-txt-file/)
- [`tox.ini` file](https://canonical-charmcraft--2754.com.readthedocs.build/2754/reference/files/tox-ini-file/)
- [`uv.lock` file](https://canonical-charmcraft--2754.com.readthedocs.build/2754/reference/files/uv-lock-file/)
I also updated the `init` command help. See `charmcraft/application/commands/init.py`.
For info about the upcoming 26.04 12-factor profiles, see #2742.
---
- [x] I've followed the [contribution guidelines](https://github.com/canonical/charmcraft/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`.
- [x] I've added or updated any relevant documentation.
- [ ] In documents I changed, I [added a meta description](https://canonical-starflow.readthedocs-hosted.com/how-to/add-a-page-meta-description/) if one was missing.
- [ ] I've updated the relevant release notes.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #2754 (0be5a5e7), bounding Kubernetes/machine dependencies, removing bundled uv.lock files, and improving init output and docs; fixes #2749. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/charmcraft#2754 (0be5a5e7): bounded Kubernetes/machine dependencies, removed bundled uv.lock files, and corrected profile-specific init output and documentation; fixes #2749. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged after reviewer approval. Bounded dependencies for kubernetes and machine profiles, removed uv.lock from templates, improved charmcraft init output to match requested profiles, and updated documentation. Fixes #2749. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
30
Confidence:
90
|
needs review | Binds dependencies, removes uv.lock from templates, and improves charmcraft init output and docs. Approved by 3 reviewers with 4 unresolved comments. CI pending. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
45
Confidence:
90
|
needs review | Binds dependencies in kubernetes/machine profiles, removes uv.lock from templates, improves init output, and updates docs. Currently has 3 approvals, recent author activity, and is marked ready to merge pending final maintainer review. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
15
Complexity:
45
Confidence:
90
|
needs review | Binds dependencies, removes uv.lock from templates, and improves charmcraft init output and docs. Currently approved by 3 reviewers with 4 unresolved comments, CI failing on snap-build and min dependencies, awaiting final maintainer review. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
15
Complexity:
35
Confidence:
90
|
needs review | Binds dependencies, removes uv.lock from kubernetes/machine profiles, improves init output, and updates docs. Currently awaiting maintainer review after contributor addressed feedback and re-requested it. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
10
Complexity:
35
Confidence:
85
|
needs review | Binds dependencies, removes uv.lock from templates, and improves init output for profiles. Fixes #2749. Holds three approvals, four unresolved comments, and recent author updates. CI shows some expected failures. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
40
Confidence:
90
|
needs review | Binds dependencies for kubernetes/machine profiles, removes uv.lock templates, and improves charmcraft init output. Currently has 3 approvals but 6 unresolved review comments and failing CI. Author addressed feedback and requested re-review. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
40
Complexity:
45
Confidence:
85
|
keep open | Binds dependencies, removes uv.lock from templates, and improves init output for profiles. Currently approved by 3 reviewers with 6 unresolved comments, pending CI checks, and awaiting author return from break. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
20
Complexity:
40
Confidence:
85
|
keep open | Binds dependencies and removes uv.lock from kubernetes/machine templates, improves init output and docs. Currently approved by 3 reviewers but has 20 unresolved comments and pending CI; author paused to address feedback until Aug 10. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
40
Complexity:
40
Confidence:
80
|
needs review | Binds dependencies, removes uv.lock files, and improves init output and docs for profiles. Currently paused by author until Aug 10, awaiting review feedback and CI fixes. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
25
Complexity:
40
Confidence:
85
|
keep open | Binds dependencies, removes uv.lock from templates, and improves charmcraft init output/docs. Approved by 3 reviewers but has 20 unresolved comments and failing CI. Author paused until Aug 10. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
15
Complexity:
45
Confidence:
90
|
keep open | Updates charmcraft init profiles to bound dependencies, remove template uv.lock files, and improve CLI output. Approved by 3 reviewers but paused by author until Aug 17 to address 23 unresolved comments. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
45
Complexity:
40
Confidence:
80
|
keep open | Binds dependencies and removes uv.lock from kubernetes and machine profiles, improves init output, and updates documentation. Approved by three reviewers but has 23 unresolved comments and failing snap-build CI. Author paused work until Aug 17. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
5
Complexity:
45
Confidence:
85
|
needs review | Binds dependencies, removes uv.lock from templates, improves init output, and updates docs. Currently approved but blocked by 24 unresolved review comments and failing CI checks while the author pauses for a break. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
15
Complexity:
40
Confidence:
90
|
needs review | Binds dependencies for kubernetes/machine profiles, removes uv.lock templates, and improves charmcraft init output. Approved by 2 reviewers with 12 unresolved comments. CI passing, some checks pending. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
10
Complexity:
45
Confidence:
85
|
keep open | Binds dependency versions in pyproject.toml.j2 and disables uv.lock generation. Currently a work in progress blocked on upstream PRs #2742 and #2748, awaiting doc updates and maintainer review. |
Update history
| Date | Change |
|---|---|
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated |
Related work
-
Related To:
canonical/charmcraft#2749
(confidence 100%)
This PR implements the requested removal of uv.lock from the Kubernetes and machine profiles.
-
Related To:
canonical/charmcraft#2742
(confidence 80%)
Its upcoming 12-factor profiles informed the dependency and documentation changes.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2749 Remove uv.lock from `kubernetes` and `machine` profiles | charmcraft | closed | Closed as fixed by merged PR canonical/charmcraft#2754 (commit 0be5a5e7): kubernetes/machine profiles no longer ship uv.lock, dependencies are bounded, and init output now tells developers to run 'uv lock'. |