feat: opt-in experimental monorepo support
Metadata
Current evaluation
Merged experimental monorepo support. Setting allow_git_build_root=True and the APP_NAME_EXPERIMENTAL_MONOREPO env var causes the provider to mount the git root to /root/project. Approved and passed CI.
Suggested action: —
No scores available.
Issue body
- [x] Have you followed the guidelines for contributing?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `make lint && make test`?
- [ ] Have you added an entry to the changelog (`docs/reference/changelog.rst`)?
---
Implementation of ST178: https://docs.google.com/document/d/1pQtEWU_q1kR7H0sf5StmISvhmhQ2-9MBM9ciw3uG88o/edit?tab=t.0
This adds experimental monorepo support. The support requires opt-in by both the application and the user. The application must enable this support by setting `allow_git_build_root=True` in the app metadata, and the user must enable support by setting the `<APP_NAME>_EXPERIMENTAL_MONOREPO` environment variable to a truthy value.
If both of those are set *and* the app is running inside of a git repository, instead of mounting the current working directory in `/root/project`, the Provider Service mounts the git root in `/root/project` and sets the working directory inside of the provider to the relevant subdirectory of `/root/project`.
This way a project that needs access to something outside of the project directory (but still within the same git repository) may access it by setting the `source` of a part to a relative directory walking up the FS tree (e.g. `../`).
CRAFT-5272
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged experimental monorepo support. Setting allow_git_build_root=True and the APP_NAME_EXPERIMENTAL_MONOREPO env var causes the provider to mount the git root to /root/project. Approved and passed CI. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
10
Complexity:
40
Confidence:
85
|
needs review | Implements experimental monorepo support via opt-in metadata and environment variables. Has two approvals but 13 unresolved review comments and a failing lint check. Requires final review and CI fixes before merging. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
10
Complexity:
65
Confidence:
85
|
keep open | Experimental prototype adding monorepo support to charmcraft. Currently in early development with no comments or reviews, awaiting further implementation and maintainer feedback. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
5
Complexity:
70
Confidence:
90
|
keep open | Experimental prototype introducing monorepo support for charmcraft. Submitted by a maintainer as a work-in-progress with no comments or CI results yet. Currently under active development. |
Update history
| Date | Change |
|---|---|
| updated |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2836 feat: opt into git-driven build root via CHARMCRAFT_EXPERIMENTAL_MONOREPO | charmcraft | merged | Merged. Adds CHARMCRAFT_EXPERIMENTAL_MONOREPO env var to enable a git-driven build root. When set, it configures allow_git_build_root=True, mounting the repository root as the build directory for monorepo support. Fixes CHARMCRAFT-710 and CHARMCRAFT-720. | |
| #1356 feat(application): enable opt-in monorepo support | rockcraft | merged | Merged opt-in monorepo support via the ROCKCRAFT_EXPERIMENTAL_MONOREPO environment variable and documentation. Approved by four reviewers and merged after passing CI, with unrelated spread test failures dismissed. |