fix(lifecycle): prefer --use-lxd over CRAFT_BUILD_ENVIRONMENT
Metadata
Current evaluation
Merged PR #1229 fixes #354 by making --use-lxd override CRAFT_BUILD_ENVIRONMENT=host to force managed mode in _use_provider, with updated tests and documentation.
Resolution: closed resolved
Reason: Resolved by merged PR #1229, which updates _use_provider to prioritize the --use-lxd flag over the CRAFT_BUILD_ENVIRONMENT environment variable, ensuring managed mode is used when requested. Tests and documentation were also updated.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Passing `--use-lxd` now runs the build in managed mode even when `CRAFT_BUILD_ENVIRONMENT=host` is set. I added the check to `_use_provider`, updated/added to the parameters for the existing `_use_provider` tests, and added a little blurb about it to the docs.
Fixes #354
---
- [X] I've followed the [contribution guidelines](https://github.com/canonical/craft-application/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.
- [X] 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.
- [X] I've updated the relevant release notes.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | closed resolved | Merged PR #1229 fixes #354 by making --use-lxd override CRAFT_BUILD_ENVIRONMENT=host to force managed mode in _use_provider, with updated tests and documentation. | |
| qwen/qwen3.6-35b-a3b | — | closed resolved | Fixed lifecycle to prefer --use-lxd over CRAFT_BUILD_ENVIRONMENT=host, ensuring managed mode builds correctly. Merged in PR #1229, resolving #354. | |
| qwen/qwen3.6-35b-a3b |
Impact:
55
Quick Win:
40
Complexity:
15
Confidence:
85
Actionability:
85
|
needs review | Fixes --use-lxd CLI flag precedence over CRAFT_BUILD_ENVIRONMENT env var in _use_provider. Approved by 3 reviewers, CI passing, ready to merge. | |
| qwen/qwen3.6-35b-a3b |
Impact:
50
Quick Win:
24
Complexity:
20
Confidence:
75
Actionability:
60
|
needs review | Fixes --use-lxd precedence over CRAFT_BUILD_ENVIRONMENT=host in _use_provider. Has 2 approvals, 2 unresolved review comments, and one failing CI check (OSV-scanner). | |
| qwen/qwen3.6-35b-a3b |
Impact:
65
Quick Win:
29
Complexity:
25
Confidence:
80
Actionability:
60
|
needs review | Fixes _use_provider to prefer --use-lxd over CRAFT_BUILD_ENVIRONMENT=host. Has 1 approval, 2 unresolved review comments, most CI passing. | |
| qwen/qwen3.6-35b-a3b |
Impact:
55
Quick Win:
29
Complexity:
25
Confidence:
75
Actionability:
70
|
needs review | Fixes _use_provider to check --use-lxd before CRAFT_BUILD_ENVIRONMENT, matching snapcraft's behavior. Clean diff, CI passing, awaiting review. |
Update history
| Date | Change |
|---|---|
| updated | |
| merged | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| updated | |
| created |
Related work
-
Likely Fixed By:
craft-application#354
(confidence 100%)
The PR body explicitly states it fixes #354.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #354 Prefer `--use-lxd` over `CRAFT_BUILD_ENVIRONMENT` | craft-application | closed | Fixed in PR #1229 by updating _use_provider to check --use-lxd before CRAFT_BUILD_ENVIRONMENT, ensuring CLI flags take priority. | |
| #4329 cli: prioritize `--use-lxd` over `SNAPCRAFT_BUILD_ENVIRONMENT` | snapcraft | merged | Merged PR #4329 (commit 7f8d4cff9) fixes #4307: get_provider() now checks the CLI --use-lxd argument before SNAPCRAFT_BUILD_ENVIRONMENT, matching documented priority. | |
| #4307 SNAPCRAFT_BUILD_ENVIRONMENT apparently takes precedence over "--use-lxd" | snapcraft | closed | Fixed by merged PR #4329 (commit 7f8d4cff9): --use-lxd now overrides SNAPCRAFT_BUILD_ENVIRONMENT, matching documented precedence. |