providers: introduce get_command_environment() to build env (CRAFT-262)
Metadata
Current evaluation
Merged PR introducing get_command_environment() to build container command environments with CHARMCRAFT_MANAGED_MODE=1 and proxy settings. Added a reviewer-requested test filtering random environment variables. Approved and passed CI.
Suggested action: —
No scores available.
Issue body
Add get_command_environment() method to build and return the command
environment to use when executing commands in the provided container.
Starting with the default buildd environment, add:
- CHARMCRAFT_MANAGED_MODE=1
- [http|https|no]_proxy settings if found in current Charmcraft process.
Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged PR introducing get_command_environment() to build container command environments with CHARMCRAFT_MANAGED_MODE=1 and proxy settings. Added a reviewer-requested test filtering random environment variables. Approved and passed CI. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Adds get_command_environment() to build container command environments, injecting CHARMCRAFT_MANAGED_MODE=1 and proxy settings. A requested test excluding random environment variables was added prior to merge. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Introduces get_command_environment() to construct container command environments, injecting CHARMCRAFT_MANAGED_MODE=1 and proxy settings. A test verifying random environment variables are excluded was added per review feedback before merging. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #410 providers: introduce clean_project_environments() (CRAFT-314) | charmcraft | merged | Merged to introduce clean_project_environments(), providing an interface for an upcoming clean command that removes all environments for a given project. Approved by two reviewers, adding 106 lines across two files. | |
| #409 providers: introduce launch_environment() (CRAFT-312) | charmcraft | merged | Merged. Introduces launch_environment() to launch and configure an LXC container for charmcraft, including buildd remote setup. Approved by two reviewers, adding 163 lines across two files. | |
| #882 (internal) Move get_command_environment() to providers.py (CRAFT-1354) | charmcraft | merged | Merged internal refactoring that relocated the get_command_environment() function to providers.py. Approved by one reviewer, passed CI checks, and modified eight files with a net reduction of 60 lines. |