Bug: TypeError: fetch failed when using proxy

Open
#136 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
github-actions, helm, typescript

Research direction

No file or test is named. Start by tracing the TypeScript code that fetches the latest Helm release in setup-helm v4.2.0, then inspect whether the self-hosted runner's HTTP(S) proxy settings reach the request and whether proxyAgent is configured. Reproduce the proxy scenario; done means the latest-version lookup succeeds through the proxy without falling back to v3.13.3.

Written by the indexing model from the issue text.

Description

bug
What happened?

We get the error

Warning: Error while fetching latest Helm release: TypeError: fetch failed. Using default version v3.13.3

when using v4.2.0 on a self-hosted runner with http proxy.

It seems that the proxy is not being used. Is proxyAgent not set using undici?

Version
  • I am using the latest version
Runner

self-hosted, linux

Relevant log output
2024-09-04T11:38:09.8209789Z Runner is running behind proxy server '<secret>' for all HTTP requests.
2024-09-04T11:38:09.8211276Z Runner is running behind proxy server '<secret>' for all HTTPS requests.
..
2024-09-04T11:39:42.6880383Z ##[group]Run azure/setup-helm@v4
2024-09-04T11:39:42.6881031Z with:
2024-09-04T11:39:42.6881437Z   version: latest
2024-09-04T11:39:42.6882168Z   token: ***
2024-09-04T11:39:42.6882706Z   downloadBaseURL: https://get.helm.sh
2024-09-04T11:39:42.6884917Z ##[endgroup]
2024-09-04T11:39:52.8510007Z ##[warning]Error while fetching latest Helm release: TypeError: fetch failed. Using default version v3.13.3
2024-09-04T11:39:52.8520686Z ##[group]Downloading v3.13.3
Dominant language
TypeScript
Stars
191
Forks
79
Avg merge
17d 9h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/setup-helm

All issues in Azure/setup-helm

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.