Skip to content

mirror option does not work correctly #1285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 of 5 tasks
thomasmey opened this issue Apr 24, 2025 · 2 comments
Open
2 of 5 tasks

mirror option does not work correctly #1285

thomasmey opened this issue Apr 24, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@thomasmey
Copy link

the mirror option does not work, it has those bugs:

  1. To the mirror URL silently the path segment "/dist" is appended, this is bad and assumes that the mirror URL is under full control, but in case that the mirror URL mirrors "/dist" path directly the mirror option cannot be used anymore, e.g. https://mirror.example.com/node-dist/ will mirror https://nodejs.org/dist
  2. When running in a self hosted action runner in private network without direct internet connectivity, the mirror option does not work. The getInfoFromManifest will timeout waiting for GitHub to not be reachable and the else branch for "Falling back to download directly from ' will never been reached.

Action version:
v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

Repro steps:
A description with steps to reproduce the issue. If you have a public example or repo to share, please provide the link.

Expected behavior:
A description of what you expected to happen.

Actual behavior:
A description of what is actually happening.

@thomasmey thomasmey added bug Something isn't working needs triage labels Apr 24, 2025
@aparnajyothi-y
Copy link
Contributor

Hello @thomasmey, Thank you for creating this issue and we will look into it :)

@priyagupta108
Copy link
Contributor

Hi @thomasmey 👋,
Thanks for raising these points. Here's some context and current thinking around them:

  1. Mirror URL Automatically Appending /dist:
    This behavior is intentional. The setup-node team, in coordination with the Node.js team, chose this design for consistency and standardization. The goal was to accommodate the majority of use cases and simplify configuration for most users.

  2. Timeout in Private Networks:
    The action attempts to fetch version from GitHub (getInfoFromManifest) before falling back to direct download. If GitHub is unreachable, the request will time out, and unfortunately, the mirror download path isn't triggered due to the way the fallback logic is structured.
    As a workaround, please try configuring the HTTPS_PROXY (or HTTP_PROXY) environment variable to route requests through a proxy server. It might help in environments with restricted outbound access. For guidance, see GitHub’s documentation on using a proxy with self-hosted runners.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants