← Back to issue list

providers: pass http-proxy and https-proxy to craft-providers

View original Github issue

Metadata

Project
snapcraft
Number
#3906
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Merged as commit 716a0474 (#3906): forwards http_proxy and https_proxy to craft-providers so core22 build instances honour proxies. Follow-up to #3884 (CRAFT-1334).

Resolution: closed resolved

Reason: The PR itself was merged into main as commit 716a0474f ("providers: pass http-proxy and https-proxy to craft-providers (#3906)"), completing the work started in snapcraft#3884, which added the http-proxy/https-proxy CLI options. Proxy support in core22 relied on canonical/craft-providers#149 setting the snapd proxy.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Merged as commit 716a0474 (#3906): forwards http_proxy and https_proxy to craft-providers so core22 build instances honour proxies. Follow-up to #3884 (CRAFT-1334).
stealth/space-bunny-alpha — closed resolved Merged as commit 716a0474 (#3906), forwarding http_proxy and https_proxy to craft-providers to enable proxy support in core22 builds.
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.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#3884 (confidence 95%)

    Predecessor PR 'cli: parse http-proxy and https-proxy' (commit df3222568), which added the CLI flags this PR propagates to providers.

  • Related To: snapcraft#3251 (confidence 60%)

    Earlier work making build providers honour http proxy settings for snapd, the legacy equivalent of this core22/craft-providers path.

  • Related To: snapcraft#3962 (confidence 50%)

    Later commit 'Setup snapd for snapcraft_legacy providers', continuing proxy/provider environment setup work.

Related issues

Issue Project State Summary Similarity
#3911 requirements: update craft-providers to 1.4.2 snapcraft merged Merged PR #3911 as commit 370c03278, updating craft-providers to 1.4.2 to add HTTP/HTTPS proxy support from craft-providers#149.
77%
#4943 Forward proxy variables into core24 build environments snapcraft closed Proxy forwarding for core24 builds landed in merged PR #4973 (commit 28da12515): Provider.setup() now calls super().setup(), with regression tests and a craft-application 4.1.0 bump.
71%