Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C-749] Support req pagination and ordering in hist/fav/tracks #3643

Merged
merged 4 commits into from
Aug 5, 2022

Conversation

raymondjacobson
Copy link
Member

@raymondjacobson raymondjacobson commented Aug 5, 2022

Description

Support simple filter on history/faves/tracks for respective table views in client.

The next step is sorters, which is a bit more complex because we don't join with users up front. We should actually change this though -- it should be all in one join RT to the db. This should be possible, but needs a tiny bit of reworking. After this step, we can make the ilike queries here to include artist name, which would be nice. Eventually gql/ES is the way to go here though.
--> EDIT: Part of this was added to this PR b/c we already have the relationship @rickyrombo added :)

And the third step will be to add total count via the X-Total-Count which will be a perf hit b/c that would be a count(*) in addition to the queries. Possibly we don't want that for everything, but it's necessary at least on the artist dashboard side.

Tests

Units + local stack pointed at db snapshot

Monitoring - How will this change be monitored? Are there sufficient logs / alerts?

for listen in listening_history_results:
track_ids.append(listen["track_id"])
listen_dates.append(listen["timestamp"])

track_results = (session.query(Track).filter(Track.track_id.in_(track_ids))).all()
Copy link
Contributor

Choose a reason for hiding this comment

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

there was no "is_current" filter here - I image this causing the query to be slow

@isaacsolo isaacsolo self-requested a review August 5, 2022 20:04
@raymondjacobson raymondjacobson merged commit bbf5556 into master Aug 5, 2022
@raymondjacobson raymondjacobson deleted the rj-c-749 branch August 5, 2022 20:55
audius-infra pushed a commit that referenced this pull request Aug 11, 2022
## Changelog

- 2022-08-11 [8c2deb9] Use correct configuration for full endpoints (#3673) [Sebastian Klingler]
- 2022-08-10 [5ab2d47] [CON-222] Fix SequelizeUniqueConstraintError for blockchain track+user IDs (#3660) [Theo Ilie]
- 2022-08-10 [1f55962] Bump to version 0.3.64 (#3669) [Cheran]
- 2022-08-10 [8e21b0e] Bump random replica select attempt count + filter out existing nodes from healthy replica set (#3661) [vicky :)]
- 2022-08-09 [19da757] Fix TypeError for userSecondarySyncMetrics (#3668) [Theo Ilie]
- 2022-08-09 [788d482] CON-297 Auth check the requester is the primary of the observed user (#3598) [vicky :)]
- 2022-08-09 [7436c17] Add unique constraint to notification (#3657) [Joseph Lee]
- 2022-08-09 [4d03415] Add slack-secrets to jobs that use Slack notifications (#3666) [Joaquin Casares]
- 2022-08-09 [feed5ab] Revert "Repair missing wallets (#3656)" (#3659) [Raymond Jacobson]
- 2022-08-09 [8196748] Change openresty location directive from exact match to regex (#3664) [Dheeraj Manjunath]
- 2022-08-08 [1c2f069] Repair missing wallets (#3656) [Raymond Jacobson]
- 2022-08-08 [f4d5481] Upgrade service-commands to latest sdk (#3655) [Dheeraj Manjunath]
- 2022-08-08 [90a1601] safer kill_running_queries_sql (#3653) [Steve Perkins]
- 2022-08-08 [6194260] Rename processImmediateSync to processManualImmediateSync for clarity (#3632) [Dheeraj Manjunath]
- 2022-08-05 [f25994c] Fix Prometheus Metric Names for Bull Queue Durations (#3649) [Johannes Naylor]
- 2022-08-05 [a2d9937] Add remix cosign (#3650) [Joseph Lee]
- 2022-08-05 [bbf5556] [C-749] Support req pagination and ordering in hist/fav/tracks (#3643) [Raymond Jacobson]
- 2022-08-05 [d6acc56] INF add alerts for failed gcp bake jobs (#3647) [Joaquin Casares]
- 2022-08-05 [a0ee00a] postgres triggers for discovery notifications (#3464) [Joseph Lee]
- 2022-08-05 [7a4d9ea] Bump sdk to v0.0.32 [audius-infra]
audius-infra pushed a commit that referenced this pull request Aug 11, 2022
## Changelog

- 2022-08-11 [8c2deb9] Use correct configuration for full endpoints (#3673) [Sebastian Klingler]
- 2022-08-10 [5ab2d47] [CON-222] Fix SequelizeUniqueConstraintError for blockchain track+user IDs (#3660) [Theo Ilie]
- 2022-08-10 [1f55962] Bump to version 0.3.64 (#3669) [Cheran]
- 2022-08-10 [8e21b0e] Bump random replica select attempt count + filter out existing nodes from healthy replica set (#3661) [vicky :)]
- 2022-08-09 [19da757] Fix TypeError for userSecondarySyncMetrics (#3668) [Theo Ilie]
- 2022-08-09 [788d482] CON-297 Auth check the requester is the primary of the observed user (#3598) [vicky :)]
- 2022-08-09 [7436c17] Add unique constraint to notification (#3657) [Joseph Lee]
- 2022-08-09 [4d03415] Add slack-secrets to jobs that use Slack notifications (#3666) [Joaquin Casares]
- 2022-08-09 [feed5ab] Revert "Repair missing wallets (#3656)" (#3659) [Raymond Jacobson]
- 2022-08-09 [8196748] Change openresty location directive from exact match to regex (#3664) [Dheeraj Manjunath]
- 2022-08-08 [1c2f069] Repair missing wallets (#3656) [Raymond Jacobson]
- 2022-08-08 [f4d5481] Upgrade service-commands to latest sdk (#3655) [Dheeraj Manjunath]
- 2022-08-08 [90a1601] safer kill_running_queries_sql (#3653) [Steve Perkins]
- 2022-08-08 [6194260] Rename processImmediateSync to processManualImmediateSync for clarity (#3632) [Dheeraj Manjunath]
- 2022-08-05 [f25994c] Fix Prometheus Metric Names for Bull Queue Durations (#3649) [Johannes Naylor]
- 2022-08-05 [a2d9937] Add remix cosign (#3650) [Joseph Lee]
- 2022-08-05 [bbf5556] [C-749] Support req pagination and ordering in hist/fav/tracks (#3643) [Raymond Jacobson]
- 2022-08-05 [d6acc56] INF add alerts for failed gcp bake jobs (#3647) [Joaquin Casares]
- 2022-08-05 [a0ee00a] postgres triggers for discovery notifications (#3464) [Joseph Lee]
- 2022-08-05 [7a4d9ea] Bump sdk to v0.0.32 [audius-infra]
sliptype pushed a commit that referenced this pull request Sep 10, 2023
sliptype pushed a commit that referenced this pull request Sep 10, 2023
[fe5fda4] Fix entity button widths (#3650) Dylan Jeffers
[820e79e] Fix user profile always showing artist tabs (#3648) Dylan Jeffers
[bc34b6f] [C-2697] Fix mobile playlist qa issues (#3638) Dylan Jeffers
[3e8d7e8] Mobile chats recalculate container bottom on keyboard shown (#3644) Reed
[39928cf] Bump app versions for full release (#3643) Reed
[437e971] Update SDK to v3.0.3-beta.56 (#3641) Marcus Pasell
[3e42cb2] [PAY-1526] Mobile chat reaction picker shadow (#3642) Reed
[ab33206] Amplitude tracking for chat report abuse (#3639) Reed
[6f570c6] Put playlist-artwork generation behind flag (#3640) Dylan Jeffers
[2f1f40d] [C-2475] Add desktop favorites playlist tab (#3637) Dylan Jeffers
[394cacb] [PAY-1516] Chat report abuse flow (#3636) Reed
[82204ec] [C-2763] Fix desktop playlist qa issues (#3634) Dylan Jeffers
[3912407] Implement OAuth Write Popup C-2664 (#3628) nicoback2
[7e13b54] [C-2783] Add terms of service link (#3635) Dylan Jeffers
[bda6eeb] Refactor: extract reusable modal field component (#3631) Andrew Mendelsohn
[c2a59dc] [PAY-1319] Fix emoji keyboard overlapping chat text input (#3629) Reed
[14150ec] [C-2784] Refactor track page to use entity button (#3624) Dylan Jeffers
[5a3e74e] [PAY-1457] Add amplitude analytics to chat features (#3627) Marcus Pasell
[d1aee10] [PAY-1412] Reset player state on app load (#3632) Reed
[965330c] [PAY-1191] Finesse keyboard enter/exit animations (#3633) Michael Piazza
[c9c531e] Create grant upon making developer app (#3630) nicoback2
[a33de30] [PAY-1464] DMs: Go to chat after successful tip (#3625) Marcus Pasell
[646a5eb] [PLAT-1015] Remove entity manager feature flag (#3619) Raymond Jacobson
[31450e7] [PAY-1498][PAY-1477] Misc mobile DMs UI Fixes (#3626) Michael Piazza
[a08f3e7] [C-2760, C-2779] Fix header for playlist and artists tabs in explore screen (#3579) Kyle Shanks
[9a98157] [C-2676] Rough release date modal (#3610) Andrew Mendelsohn
[5e9a847] [C-2771, C-2772] Add duplicate add to playlist confirmation drawer and modal (#3601) Kyle Shanks
[49ca553] [PAY-1468] Fix mobile chats copy message button (#3623) Reed
[193ae1c] [PAY-1483] Patch RN to fix textinput multiline onchange not firing (#3622) Reed
@AudiusProject AudiusProject deleted a comment from linear bot Sep 11, 2023
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.

4 participants