audius-protocol icon indicating copy to clipboard operation
audius-protocol copied to clipboard

Record Track Downloads via Entity Manager

Open rickyrombo opened this issue 1 year ago • 4 comments

Description

Quick EntityManager implementation of recording track downloads across the network.

Ideal solution would be to do this from content or discovery rather than the client, but this is a quick and dirty way of getting it done fast.

Note the commit messages - might help going commit by commit.

Things I would change given more time:

  • Send the transaction from Discovery or Content rather than relying on the client
  • Include the download count in track aggregates, or generally have some sort of endpoint to expose the counts
  • Notifs triggered on new rows for downloads

How Has This Been Tested?

Tested locally w/ download all on local dev client

rickyrombo avatar Jul 11 '24 21:07 rickyrombo

🦋 Changeset detected

Latest commit: 71159a7c0c2b570bbdbb34acb5faea0354568728

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@audius/sdk Patch
@audius/sp-actions Patch

Not sure what this means? Click here to learn what changesets are.

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

changeset-bot[bot] avatar Jul 11 '24 21:07 changeset-bot[bot]

this is AWESOME! I'm imagining notifications when someone downloads your track 👀

sliptype avatar Jul 11 '24 22:07 sliptype

Preview this change https://demo.audius.co/mjp-track-recorded-downloads

audius-infra avatar Jul 11 '24 23:07 audius-infra

Preview this change https://demo.audius.co/mjp-track-recorded-downloads

audius-infra avatar Jul 16 '24 23:07 audius-infra

⚠️ GitGuardian has uncovered 8 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
11648676 Triggered Generic High Entropy Secret 9beb0edcf5fd239cc1f329d77d1b0b7dea058f38 core/infra/dev_config/discovery-one.docker.env View secret
11648676 Triggered Generic High Entropy Secret 9beb0edcf5fd239cc1f329d77d1b0b7dea058f38 core/infra/dev_config/discovery-one.env View secret
11648678 Triggered Generic High Entropy Secret 9beb0edcf5fd239cc1f329d77d1b0b7dea058f38 core/infra/dev_config/content-three.env View secret
11648678 Triggered Generic High Entropy Secret 9beb0edcf5fd239cc1f329d77d1b0b7dea058f38 core/infra/dev_config/content-three.docker.env View secret
11648679 Triggered Generic High Entropy Secret 9beb0edcf5fd239cc1f329d77d1b0b7dea058f38 core/infra/dev_config/content-two.docker.env View secret
11648679 Triggered Generic High Entropy Secret 9beb0edcf5fd239cc1f329d77d1b0b7dea058f38 core/infra/dev_config/content-two.env View secret
11648680 Triggered Generic High Entropy Secret 9beb0edcf5fd239cc1f329d77d1b0b7dea058f38 core/infra/dev_config/content-one.env View secret
11648680 Triggered Generic High Entropy Secret 9beb0edcf5fd239cc1f329d77d1b0b7dea058f38 core/infra/dev_config/content-one.docker.env View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. 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


🦉 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.

gitguardian[bot] avatar Aug 09 '24 00:08 gitguardian[bot]

Preview this change https://demo.audius.co/mjp-track-recorded-downloads

audius-infra avatar Aug 09 '24 00:08 audius-infra