Skip to content

DDEX update/delete#8251

Merged
michellebrier merged 5 commits into
mainfrom
mbrier/proto-1729/ddex-golang-crud
May 1, 2024
Merged

DDEX update/delete#8251
michellebrier merged 5 commits into
mainfrom
mbrier/proto-1729/ddex-golang-crud

Conversation

@michellebrier

@michellebrier michellebrier commented Apr 26, 2024

Copy link
Copy Markdown
Contributor

Description

Parse updates by

  1. Searching for the existing release ID in the releases collection
  2. Setting is_update = true if there is an existing release. Parse the new message as usual and replace the old release in the db. If is_update is true, the publisher will issue an updateTrack/updateAlbum via the sdk rather than an upload.

Accept 2 ways to indicate a takedown:

  • Via a NewReleaseMessage with no deal. If the release ID exists in the releases collection, takedown the release. If not, mark this NewReleaseMessage as invalid (it's not a takedown as far as we can tell and should have a deal)
  • Via a PurgeReleaseMessage. I am not sure what the filenames are for these types of messages so not sure this will 100% work with the crawler (e.g. if there's 1 release ID to be purged per PurgeReleaseMessage and it's specified in the filename then it's good to go, but if there are many IDs to takedown per PurgeReleaseMessage, we need to rethink how we use the ID from the filename as the releaseID for the document in the releases collection). Need real examples

How the parser takes down a release:
If the release has been published, set the release_status to awaiting_delete. The publisher then polls this and deletes the track/album via the sdk. If the release is awaiting publishing, set the release_status to deleted. The publisher will no longer poll this release for publication in the future.

Also remove all redundant types in the publisher that are already specified in the parser.

How Has This Been Tested?

TODO

@changeset-bot

changeset-bot Bot commented Apr 26, 2024

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 721d9a8

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

@michellebrier michellebrier force-pushed the mbrier/proto-1729/ddex-golang-crud branch from 9a307dc to 593603e Compare April 26, 2024 21:55
…ed in XML. NOTE: not sure what the filename looks like for PurgeReleaseMessages so I'm not sure if the crawler will correctly handle these types of messages. Need real examples to test with
if releaseIDNode == nil {
return fmt.Errorf("no <ReleaseId> found")
}
releaseIDs := getReleaseIDs(releaseIDNode)

@michellebrier michellebrier Apr 30, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parse all known release IDs (GRid, ISRC, ICPN) in a <ReleaseId> node. When required, as is here, try each of these IDs when searching the releases collection until the first match.

The _id in a releases document is the ID we pull from the filename. We don't actually know which ID type this corresponds to and in the examples we have, there are often multiple ID types listed in the <ReleaseId> node.

@stereosteve stereosteve left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@michellebrier michellebrier merged commit 1219fe4 into main May 1, 2024
@michellebrier michellebrier deleted the mbrier/proto-1729/ddex-golang-crud branch May 1, 2024 00:00
audius-infra pushed a commit that referenced this pull request May 1, 2024
[6f8bab6] Fix lint items (#8285) Raymond Jacobson
[1219fe4] DDEX update/delete (#8251) Michelle Brier
[7972593] [PROTO-1801] Add prof pic, hover states (#8280) Raymond Jacobson
[32a5d7b] [PAY-2789] Bug fix for retaining access on track removal from prem album (#8277) Reed
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