[API-84] Add track /stream /download /inspect#57
Conversation
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 16874868 | Triggered | Generic High Entropy Secret | dcc3500 | config/config.go | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
| // tryFindWorkingUrl attempts to validate a media link by checking if it can serve content. | ||
| // It tries the primary URL first, then falls back to mirrors if needed. | ||
| // Returns the first valid URL found or the main URL if nothing works. | ||
| func tryFindWorkingUrl(mediaLink *dbv1.MediaLink) *url.URL { |
There was a problem hiding this comment.
Do we want to keep doing this or just send it to the first one?
There was a problem hiding this comment.
I think we do. I went back & forth for a while, but for people streaming from the public API until we have proportional rewards, etc., to promise a really high QoS - i think about lots of scenarios where the stream endpoint "just doesn't work"
e.g. node de-registers & content is still shuffling around
There was a problem hiding this comment.
we have the mirrors now though, so this code is much nicer than python
| DevNodes = []Node{ | ||
| { | ||
| DelegateOwnerWallet: "0x0000000000000000000000000000000000000001", | ||
| Endpoint: "https://dummynode.com", |
There was a problem hiding this comment.
Why not match these to the audius-compose DN / CNs?
There was a problem hiding this comment.
wasn't sure what our plan there was for local stack and this is all i needed for this PR... down to change it if we want though
There was a problem hiding this comment.
not blocking, think we will want eventually though
|
|
||
| infos := make([]*inspectResponse, len(tracks)) | ||
| var wg sync.WaitGroup | ||
| errChan := make(chan error, len(tracks)) |
There was a problem hiding this comment.
Seems like we're not actually using errChan.
I think the intention is to ignore errors silently, which is fine... but in that case you can remove the errChan
You could also use an errgroup here... if you want.
There was a problem hiding this comment.
oh woops yea thx. great catch
A bit more of a pain than I wanted
Tried to keep flow linear but with same behavior as python
Tested=
api diff not super useful for these.
here's the response from inspect