providers: pass http-proxy and https-proxy to craft-providers
Metadata
Current evaluation
Merged. Passes http_proxy and https_proxy environment variables to craft-providers, enabling proxy support in core22. Approved by reviewer, passed CI, and increased code 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`?
-----
Follow up to https://github.com/snapcore/snapcraft/pull/3884. This PR allows proxies to be used in core22 by passing `http_proxy` and `https_proxy` to `craft-providers` as environmental variables.
`craft-providers` sets the snapd proxy in [this PR](https://github.com/canonical/craft-providers/pull/149).
I tested this manually. I used working http and https proxies from [this site](https://www.freeproxylists.net/) and checked they were set in the instance. Then I chose an invalid proxy and received a network error inside the instance when snapcraft attempted to download and install a snap.
(CRAFT-1334)
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged. Passes http_proxy and https_proxy environment variables to craft-providers, enabling proxy support in core22. Approved by reviewer, passed CI, and increased code coverage. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Passes http_proxy and https_proxy environment variables to craft-providers, enabling proxy support for core22 builds. Follows up on PR #3884 and resolves CRAFT-1334. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged to main. Passes http_proxy and https_proxy environment variables to craft-providers for core22 builds, enabling proxy support in instances. Resolves CRAFT-1334 and follows up on PR #3884. Achieved 100% diff coverage. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #3911 requirements: update craft-providers to 1.4.2 | snapcraft | merged | Merged craft-providers update to 1.4.2, enabling http_proxy and https_proxy support. The change passed all checks and merged without coverage impact. | |
| #4973 fix(provider): forward proxy variables to core24 build environments | snapcraft | merged | Merged. Forwards http_proxy, https_proxy, and no_proxy variables into core24 build environments. Includes a regression test and bumps craft-application to 4.1.0. Approved by two reviewers. | |
| #3884 cli: parse http-proxy and https-proxy | snapcraft | merged | Merged into hotfix/7.1.2. Adds CLI parsing for --http-proxy and --https-proxy to resolve CRAFT-1217. Approved, passed CI with 100% diff coverage, and merged despite a minor unresolved comment regarding core22 proxy support. |