providers: move `get_command_environment()` to providers.py
Metadata
Current evaluation
Merged pull request moving the snapcraft-specific get_command_environment() function out of the craft-providers interface and into providers.py. Approved, passed CI checks, and achieved 100% coverage.
Suggested action: —
No scores available.
Issue body
- [X] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [X] Have you successfully run `make lint`?
- [X] Have you successfully run `pytest tests/unit`?
-----
`get_command_environment()` is a snapcraft-specific call, so it is moved out of the craft-providers interface.
Similar to https://github.com/canonical/rockcraft/pull/75
(CRAFT-1352)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged pull request moving the snapcraft-specific get_command_environment() function out of the craft-providers interface and into providers.py. Approved, passed CI checks, and achieved 100% coverage. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Relocated the snapcraft-specific get_command_environment() function from the craft-providers interface to providers.py, matching rockcraft refactoring. Achieved 100% diff coverage and resolves CRAFT-1352. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into main. Moved the snapcraft-specific get_command_environment() function from the craft-providers interface to providers.py. The refactor achieved 100% diff coverage and aligns with upstream interface cleanup. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. | |
| #75 providers: move get_command_environment() to providers.py | rockcraft | merged | Merged after approval and passing CI checks. The rockcraft-specific get_command_environment() function was relocated to providers.py across eight files, improving module organization and reducing duplication. | |
| #3938 providers: move `confirm_with_user()` call to providers.py (#91) | snapcraft | merged | Merged changes moving the snapcraft-specific confirm_with_user() call out of the craft-providers interface into providers.py. The update was approved, passed CI, and aligns with parallel rockcraft modifications. | |
| #3926 providers: move `get_instance_name()` to providers.py | snapcraft | merged | Merged. Moved get_instance_name() to snapcraft/providers/providers.py, removing snapcraft-specific logic from provider modules. This refactoring prepares the codebase for the new craft-providers API. Approved by reviewers and passed all CI checks. | |
| #95 providers: add `create_environment` method | rockcraft | merged | Merged the addition of a create_environment method to the providers module. The method supports clean_project_environment and aligns with snapcraft and charmcraft implementations. Approved by one reviewer and passed CI checks. |