Update archiver/relay/solana-relay/staking to @audius/sdk ^15.3.1#20
Open
dylanjeffers wants to merge 1 commit into
Open
Update archiver/relay/solana-relay/staking to @audius/sdk ^15.3.1#20dylanjeffers wants to merge 1 commit into
dylanjeffers wants to merge 1 commit into
Conversation
Brings the four remaining pedalboard plugins still on the old SDK onto
^15.3.1, matching the version anti-abuse-oracle already runs in prod.
Plugin bumps:
- archiver: 10.0.0 -> ^15.3.1
- relay: 10.0.0 -> ^15.3.1
- solana-relay: 15.1.0 -> ^15.3.1
- staking: 10.0.0 -> ^15.3.1
Source migrations the new SDK requires:
- archiver: bare sdk() now exposes only the *generated* TracksApi,
which doesn't include getTrackDownloadUrl. Switch the archiver's
SDK helper to createSdkWithServices so the extended TracksApi
(with getTrackDownloadUrl) is wired up.
- relay: bump 10.0.0 -> ^15.3.1, migrate sdk() -> createSdkWithServices
so audiusSdk.services.entityManager (decodeManageEntity /
recoverSigner) keeps working; switch the AudiusSdk type alias to
AudiusSdkWithServices; drop the 'staging' environment value (no
longer accepted by the SDK) by routing stage to 'production'.
services.entityManager is now typed as optional on
AudiusSdkWithServices but is always populated in practice by the
SDK's default services, so add ! assertions at the call sites to
keep tsc happy. Update the sandbox script to use apiEndpoint for
the staging discovery node, and switch users.updateProfile (gone
in 15.3.1) to the equivalent users.updateUser({ id, userId,
metadata }) shape.
- solana-relay, staking: package.json bump only; no source changes
(the SDK types they use - FirstBuyQuoteResponse, RelayRequestBody -
are still exported, and staking has no @audius/sdk imports in src).
Intentionally NOT included:
- trending-challenge-rewards: stays at 14.1.0. The bump to 15.3.1
with createSdkWithServices was tried in 044f0e2 and explicitly
reverted in 2d9f65d; the revert reason isn't documented but
predates this PR, so honoring it.
- anti-abuse-oracle: already at ^15.3.1 on main (PR #34); the original
PR #20 AAO changes targeted the pre-migration source that no
longer exists.
Pre-existing main-branch issues not addressed by this PR:
- apps/relay/src/middleware/logging.ts(21,5) has a pino Logger<never>
type incompatibility introduced by the node 24 upgrade / pino pin
commits. Unrelated to the SDK and present without this change.
- viem / abitype .d.ts syntax errors under node_modules are flagged
by relay's TS 5.0.4 - same as on main, not introduced here.
Test plan:
- [x] npm install resolves all four plugins to @audius/sdk 15.3.1
- [x] tsc --noEmit on archiver, solana-relay, staking source is clean
- [x] relay tsc errors are reduced from ~10 to 1 (the pre-existing
pino issue); all 'services does not exist on UsersApi' errors
that existed on main are gone
- [ ] Smoke test the relay against a stage discovery node to confirm
decodeManageEntity / recoverSigner paths still work end-to-end
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
847cf24 to
63f6574
Compare
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
Rebased onto current main. Bumps the four pedalboard plugins still on the old
@audius/sdkonto^15.3.1, matching the versionanti-abuse-oraclealready runs in prod (PR #34).archiver10.0.0^15.3.1relay10.0.0^15.3.1solana-relay15.1.0^15.3.1staking10.0.0^15.3.1Source migrations the new SDK requires
archiver: bare
sdk()now exposes only the generatedTracksApi, which doesn't includegetTrackDownloadUrl. Switchapps/archiver/src/sdk.tstocreateSdkWithServicesso the extendedTracksApi(withgetTrackDownloadUrl) is wired up.relay:
sdk()→createSdkWithServicessoaudiusSdk.services.entityManager(decodeManageEntity/recoverSigner) keeps working. Switch theAudiusSdktype alias toAudiusSdkWithServices.services.entityManageris now typed as optional onAudiusSdkWithServicesbut is always populated in practice by the SDK's default services — add!assertions at the call sites (coreRelay.ts,middleware/rateLimiter.ts,middleware/validator.ts,utils.ts,validate.ts).'staging'environment value (no longer accepted by the SDK) by routing stage to'production'. Thesandboxscript uses the newapiEndpointoverride to point at staging discovery.users.updateProfileis gone in 15.3.1 — sandbox switches to the equivalentusers.updateUser({ id, userId, metadata })shape.solana-relay, staking: package.json bump only. The SDK types in solana-relay source (
FirstBuyQuoteResponse,RelayRequestBody) are still exported; staking has no@audius/sdkimports in src/.Intentionally NOT included
trending-challenge-rewards: stays at14.1.0. The bump to 15.3.1 withcreateSdkWithServiceswas tried in044f0e2and explicitly reverted in2d9f65d. The revert reason isn't documented in the revert commit message, so honoring the revert.anti-abuse-oracle: already at^15.3.1on main (PR chore(aao): bump @audius/sdk to 15.3.1 to fix lodash ESM crash #34). The original PR Update archiver/relay/solana-relay/staking to @audius/sdk ^15.3.1 #20 AAO changes targeted the pre-migration source that no longer exists (the AAO was migrated into pedalboard from the apps monorepo in PR feat: migrate anti-abuse oracle from apps to pedalboard #29 with a completely different source layout).Pre-existing main-branch issues not addressed here
apps/relay/src/middleware/logging.ts(21,5)has a pinoLogger<never>type incompatibility, introduced by the node 24 upgrade / pino pin commits — present on main with or without this change. Relay was also dropped from CI in PR Drop mri and relay from CI; remove mri source #15, so this hasn't been blocking anyone..d.tssyntax errors undernode_modulesare flagged by the apps' TS 5.0.4 — same as on main.Test plan
npm installresolves all four plugins to@audius/sdk@15.3.1tsc --noEmitonarchiver,solana-relay,stakingsource is cleantscerrors are reduced from ~10 to 1 (the pre-existing pino issue); allservices does not exist on UsersApierrors that exist on plain main are gone with this changedecodeManageEntity/recoverSignerpaths still work end-to-endgetTrackDownloadUrlcalls — the switch tocreateSdkWithServicesis required to expose that endpoint🤖 Generated with Claude Code