feat: add Chrome install mirror env vars#871
Open
M4n5ter wants to merge 2 commits intovercel-labs:mainfrom
Open
feat: add Chrome install mirror env vars#871M4n5ter wants to merge 2 commits intovercel-labs:mainfrom
M4n5ter wants to merge 2 commits intovercel-labs:mainfrom
Conversation
Contributor
|
@M4n5ter is attempting to deploy a commit to the Vercel Labs Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add Chrome install mirror support via two explicit environment variables:
AGENT_BROWSER_CHROME_LAST_KNOWN_GOOD_URLAGENT_BROWSER_CHROME_DOWNLOAD_BASE_URLThis keeps the Stable version source and archive download base configurable without assuming they come from the same endpoint shape.
It also makes
agent-browser installusable in restricted network environments and private mirror deployments where direct access to Google's Chrome for Testing endpoints is blocked or undesirable.Why two environment variables
The previous implementation depended on
last-known-good-versions-with-downloads.jsonand trusted the embedded per-platform download URLs.That does not work well for all mirrors:
last-known-good-versions.jsonfor Stable version resolutionlast-known-good-versions-with-downloads.jsonnpmmirrorexposesknown-good-versions-with-downloads.json, but that is not a drop-in replacement for Stable resolution and does not provide the exact contract we want hereBy splitting the configuration into a Stable manifest URL and a download base URL, install logic can:
{version}/{platform}/{archive}base layoutwith-downloadsmetadata being present or rewrittenExample mirror configuration:
Changes
last-known-good-versions-with-downloads.jsondependency with Stable version resolution fromlast-known-good-versions.jsonAGENT_BROWSER_CHROME_LAST_KNOWN_GOOD_URLandAGENT_BROWSER_CHROME_DOWNLOAD_BASE_URL