Skip to content

Fix partial album/playlist uploads on per-track publish failures#14028

Closed
cursor[bot] wants to merge 1 commit intomainfrom
cursor/bug-report-resolution-64f7
Closed

Fix partial album/playlist uploads on per-track publish failures#14028
cursor[bot] wants to merge 1 commit intomainfrom
cursor/bug-report-resolution-64f7

Conversation

@cursor
Copy link
Copy Markdown
Contributor

@cursor cursor bot commented Mar 31, 2026

Summary

  • Prevent collection creation when any track publish fails in tan-query upload flow.
  • Ensure album/playlist uploads fail atomically instead of silently dropping failed tracks.

Root Cause

usePublishCollection previously filtered out track publish failures (!trackId) and still created the collection with remaining tracks. This allowed partial album/playlist uploads when intermittent track publish failures occurred.

Fix

  • Updated packages/common/src/api/tan-query/upload/usePublishCollection.ts to:
    • Detect per-track publish failures (error or missing trackId) and throw before creating the collection.
    • Build playlistContents from all published tracks only after validating there are no failures.

Validation

  • Code path reviewed end-to-end in tan-query upload stack (useUpload -> publishCollection -> publishTracks).
  • Local lint execution was not possible in this environment (eslint: not found), so validation was performed via targeted code inspection and diff review.
Open in Web View Automation 

Co-authored-by: Ray Jacobson <raymondjacobson@users.noreply.github.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 31, 2026

⚠️ No Changeset found

Latest commit: f78be94

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@raymondjacobson raymondjacobson marked this pull request as ready for review March 31, 2026 19:31
@github-actions
Copy link
Copy Markdown
Contributor

🌐 Web preview ready

Preview URL: https://audius-web-preview-pr-14028.audius.workers.dev

Unique preview for this PR (deployed from this branch).
Workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants