Open
Conversation
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.
Root cause: In createStemsArchive.ts, the prod branch was following one redirect from sdk.tracks.getTrackDownloadUrl(...) and then rewriting the resulting URL's host to creatornode2.audius.co. That workaround was added in pedalboard commit 6a0ee59 ("Use storeall for archiver") when the old Python API returned a content-node URL directly.
The Go API now handles this itself: v1_track_download.go:53 calls tryFindWorkingUrl, which probes the primary URL and every mirror with Range: bytes=0-1 and returns a 302 to whichever host actually serves the bytes. Rewriting that already-verified host to creatornode2 sent requests to a node that may not hold the file at all → 404 on a file that exists.
Fix: Removed the getRedirectUrl helper, the node-fetch import, and the prod-only host rewrite. node-fetch follows 3xx by default, so we just pass the API URL to downloadFile and let the redirect land on the API's chosen mirror. The comment in the file explains why, so this doesn't get re-introduced.