Skip to content
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

Enable remote proxy binary downloads #2254

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

LongLiveCHIEF
Copy link
Contributor

This PR adds the ability to specify a proxy/mirror remote for the binary installation methods for apollo rover. This functionality was added for the npm installer in #1713 and #1675, and is being added for the router binary installation script in apollographql/router#6244

@LongLiveCHIEF LongLiveCHIEF requested review from a team as code owners November 7, 2024 15:13
@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Nov 7, 2024

🚫 Docs Preview Denied

You must have approval from an Apollo team member to request a docs preview. If you are a team member, please comment !docs preview.

File Changes

4 new, 8 changed, 3 removed
+ (developer-tools)/rover/commands/cloud.mdx
+ (developer-tools)/rover/configuring.mdx
+ (developer-tools)/rover/getting-started.mdx
+ (developer-tools)/rover/migration.mdx
* (developer-tools)/rover/ci-cd.mdx
* (developer-tools)/rover/index.mdx
* (developer-tools)/rover/validating-client-operations.mdx
* (developer-tools)/rover/commands/dev.mdx
* (developer-tools)/rover/commands/graphs.mdx
* (developer-tools)/rover/commands/persisted-queries.mdx
* (developer-tools)/rover/commands/subgraphs.mdx
* (developer-tools)/rover/commands/supergraphs.mdx
- (developer-tools)/rover/configuring.md
- (developer-tools)/rover/getting-started.md
- (developer-tools)/rover/migration.md

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, the existing APOLLO_ROVER_DOWNLOAD_HOST env var sets the binary download URL for npm installation, while the new APOLLO_ROVER_BINARY_REMOTE would set the binary download URL for Bash and PowerShell. We need distinct env vars because the download URLs are usually different, but they serve similar purposes.

Given the above, it'd be ideal if the name of the new env var:

  1. Conveys it's a download URL for the specific Bash/PowerShell use case of downloading from a GitHub proxy/mirror
  2. Is consistent and/or uses the same namespacing as the existing env var, because they're for similar purposes.

For 2, we could use the existing prefix of APOLLO_ROVER_DOWNLOAD_*. For 1, we could append a suffix that conveys it's a GitHub proxy or remote mirror, something like:

  • APOLLO_ROVER_DOWNLOAD_GITHUB_PROXY
  • APOLLO_ROVER_DOWNLOAD_PROXY_HOST
  • APOLLO_ROVER_DOWNLOAD_GITHUB_HOST
  • APOLLO_ROVER_DOWNLOAD_GITHUB_MIRROR

thoughts @Meschreiber ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great point, thanks for taking a look so quickly @shorgi !

I'm fine with any of the above. To decide, one question for @LongLiveCHIEF :

Does the download URL for Bash and PowerShell always have to be a GH repo URL? (Will it work with other binary URL sources?)

Besides that, I like the inclusion of PROXY to make clearer how it's different from DOWNLOAD_HOST.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I worry that the terminology "proxy" will be easily conflated with the more "classical" HTTP proxies (e.g., those corporate SOCKS type) which would require different configuration.

@LongLiveCHIEF
Copy link
Contributor Author

LongLiveCHIEF commented Nov 16, 2024 via email

@LongLiveCHIEF
Copy link
Contributor Author

LongLiveCHIEF commented Nov 19, 2024 via email

@Meschreiber
Copy link
Contributor

Thanks @LongLiveCHIEF -- so is the keyword here GITHUB? Thoughts on APOLLO_ROVER_DOWNLOAD_GITHUB_HOST to complement APOLLO_ROVER_DOWNLOAD_HOST?

@LongLiveCHIEF
Copy link
Contributor Author

Thanks @LongLiveCHIEF -- so is the keyword here GITHUB? Thoughts on APOLLO_ROVER_DOWNLOAD_GITHUB_HOST to complement APOLLO_ROVER_DOWNLOAD_HOST?

Yep, that would totally work. If that works for you, then I will rebase and update my PR's to use

APOLLO_ROVER_DOWNLOAD_GITHUB_HOST and APOLLO_ROUTER_DOWNLOAD_GITHUB_HOST

@Meschreiber
Copy link
Contributor

@LongLiveCHIEF , works for me, thank you! 🙇‍♀️

@LongLiveCHIEF
Copy link
Contributor Author

@Meschreiber @shorgi rebase complete on both PR's, using suggested syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants