-
Notifications
You must be signed in to change notification settings - Fork 10
LOC-7291: download darwin-arm64 binary on Apple Silicon #32
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
vivianludrick
wants to merge
2
commits into
master
Choose a base branch
from
feat/LOC-7291-darwin-arm64-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This URL has no object behind it and no publisher, so releasing this turns a working download into a hard 404 on Apple Silicon.
You've documented it in the PR body, but it's worth separating this binding from the others: nodejs/python/ruby/java/csharp resolve their source URL from Rails /
bstack-local-prod, so they only degrade once Rosetta is gone. php and perl hardcode the legacys3.amazonaws.com/browserStack/browserstack-local/host, so they break immediately on release — an arm64 Mac that works today via the Rosetta x64 binary starts failing at download.And the failure is sticky.
download_binary()never checks the curl result, so S3's 404 body gets written to~/.browserstack/BrowserStackLocalandchmod 0755'd.binary_path()then short-circuits onfile_exists($binary_path)on every subsequent run, so the user stays broken until they delete the file by hand — no amount of retrying recovers it.Fix — either:
BrowserStackLocal-darwin-arm64being published to that bucket, and added to whatever publishes the other legacy objects; orGiven the sticky-file behaviour, option 2 looks worth doing regardless of ordering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went with option 2 (plus the sticky-file fix) — done in the latest commit:
CURLOPT_FAILONERRORstops HTTP error bodies from ever reaching disk.-darwin-arm64download falls back to the-darwin-x64URL (still works on Apple Silicon via Rosetta 2), so release ordering can't turn a working download into a 404.unlink()ed and aLocalExceptionis thrown —binary_path()can no longer short-circuit on a poisoned file.Option 1 (publishing the arm64 object to the legacy bucket + wiring it into whatever publishes the others) is still worth doing so arm64 users get the native binary here too — tracking that with the release-ordering work, but it's no longer a correctness gate for this PR.