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

Playlist validation and batching #3484

Merged
merged 7 commits into from
Jul 18, 2022

Conversation

isaacsolo
Copy link
Contributor

@isaacsolo isaacsolo commented Jul 15, 2022

Description

Batch playlist updates + add validations.

Tests

Tested locally, manually creating/updating/deleting playlist and validating DB records.

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

@isaacsolo isaacsolo changed the base branch from master to hn_audius_data_write_path July 15, 2022 19:24
@gitguardian
Copy link

gitguardian bot commented Jul 15, 2022

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


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

Our GitHub checks need improvements? Share your feedbacks!

@isaacsolo isaacsolo force-pushed the is-valid-playlist branch 2 times, most recently from 115d6ba to 27ec6f2 Compare July 18, 2022 05:37
@isaacsolo isaacsolo changed the title Playlist validation Playlist validation and batching Jul 18, 2022
@isaacsolo isaacsolo marked this pull request as ready for review July 18, 2022 05:39
@isaacsolo isaacsolo requested a review from hareeshnagaraj July 18, 2022 05:39
@isaacsolo isaacsolo force-pushed the is-valid-playlist branch 2 times, most recently from f5d7c9f to 3c3793e Compare July 18, 2022 17:20
@isaacsolo isaacsolo force-pushed the is-valid-playlist branch from 3c3793e to 2735bae Compare July 18, 2022 18:52
@@ -180,7 +180,7 @@ export class EntityManager extends Base {
action: updateAction, // why include action here?
entityType,
playlist_id: playlistId,
playlist_contents: trackIds || playlist.playlist_contents,
playlist_contents: trackIds || playlist.playlist_contents.trackIds, // TODO fix schema validation from array to object
Copy link
Contributor

Choose a reason for hiding this comment

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

I handled this in base branch - we're going to keep it as an array and do the diffing logic indexing side. makes things cleaner re: notifs etc. let's chat offline


return playlist_record
def copy_record(old_playlist: Playlist, block_number, event_blockhash, txhash):
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you have to do this - pretty sure you can initialize a new record from the old one?

Copy link
Contributor

Choose a reason for hiding this comment

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

let's experiment once on the main branch, not a blocker for now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that expunge invalidate thing right? that's kinda confusing to me and i read somewhere it was dangerous to do but i can change it. this just seemed clearer to get working.

Copy link
Contributor

@hareeshnagaraj hareeshnagaraj left a comment

Choose a reason for hiding this comment

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

LGTM!! Can address any minor required changes async

@isaacsolo isaacsolo merged commit 4fb6ce5 into hn_audius_data_write_path Jul 18, 2022
@isaacsolo isaacsolo deleted the is-valid-playlist branch July 18, 2022 23:26
sliptype pushed a commit that referenced this pull request Sep 10, 2023
[9a0592f] [PAY-1355] Add space before learn more link in inbox unavailable message (#3507) Reed
[989390c] [PAY-1267] Add space before placeholder in chat textinput (#3508) Reed
[a1e66ce] [PAY-1377] Compose message icon to TouchableOpacity (#3506) Reed
[dc12349] Remove write_metadata_through_chain flag (#3432) Michelle Brier
[5523041] Add clientVersion to mobile analytics (#3498) Sebastian Klingler
[e2ba8ed] [PAY-1343] First message in new chat shows purple unread indicator (#3503) Reed
[52096cf] Fix upload regression on stage (#3502) Andrew Mendelsohn
[cdf5663] [PAY-1175] DMs: Autofocus, clear search, elevate placeholder (#3486) Marcus Pasell
[d012240] [PAY-1318] Missing Shadow and Space Between Divider and Header (#3500) Michael Piazza
[e71845e] [PAY-1336] Updates to mobile chats user search screen (#3489) Reed
[9d12c62] [PLAT-1005] Parse for add track to playlist notification from backend (#3439) sabrina-kiam
[d9c62b1] [C-2708] Improvements around codepush & force pushing (#3501) Sebastian Klingler
[aa26688] [pay-1311] Reset chat state on sign out (#3499) Randy Schott
[6079466] [PAY-1337] Fix mobile chat message shadows (#3494) Reed
[643d3e0] [PAY-1305] DMs: Add skeletons for chats on web (#3496) Marcus Pasell
[5e5c900] [] Add styling fixes from mobile playlist updates QA (#3485) Kyle Shanks
[e182e8b] [PAY-1308] Use all messages for tracking latest received (#3484) Randy Schott
[1e16ea8] Push props down to SelectPage (#3495) Andrew Mendelsohn
[8993e52] [C-2705] Port upload files page to new upload form (#3493) Andrew Mendelsohn
[986b621] [PAY-1303] Add toastSagas to mobile (#3488) Marcus Pasell
[07c35e2] [PAY-1324][PAY-1326][PAY-1323][PAY-1327][PAY-1331][PAY-1328][PAY-1320] DMs UI fixes 2 (#3491) Michael Piazza
[f37c767] [C-2658] Fix favorite Hot & New in sign up (#3492) Sebastian Klingler
[404acd6] HOTFIX: left-nav delete-confirmation (#3490) Dylan Jeffers
[89ac0a5] [C-2699] Fix collection action button sizes (#3487) Dylan Jeffers
[bef1745] [PAY-1330][PAY-1317][PAY-1321] Polish DMs #1 (#3482) Michael Piazza
[c7611a8] Rename addToast to registerToast (#3472) Marcus Pasell
[614863c] [C-2700][C-2701] upload redesign feature flag and placeholder page (#3480) Andrew Mendelsohn
[1f70aa4] [PAY-1316] DMs: Do the thing (Fix mobile chats not populating) (#3483) Marcus Pasell
[4cf0c1e] [C-2702] Remove initialSelectedNode from disc-node selector (#3481) Dylan Jeffers
[6063b9e] SDK v2.0.3 beta.32 (#3479) Marcus Pasell
[c106ed8] [PAY-1283] DMs: Listen for chat messages app wide, and get unread message count on load (#3477) Marcus Pasell
[8845ae7] [PAY-1329] Fix marking chats as unread (#3478) Reed
[c6347af] Update end of message history copy on mobile (#3476) Reed
[2700165] [PAY-1293] Adjust portal and animations to get more consistent behavior on Android (#3475) Randy Schott
[afe7deb] [PAY-1295] DMs: Add a toast when chats fail to create (#3468) Marcus Pasell
[72d2788] DMs: Rename "Thread" to "Conversation" (#3474) Marcus Pasell
[5d69114] DMs: Add end of messages notice (#3466) Marcus Pasell
[e35a23f] Change delete thread copy to conversation on mobile (#3473) Reed
[31a6a55] [PAY-1301] DMs: Add empty state to search users modal (#3470) Marcus Pasell
[032107c] [PAY-1292] DMs: Delete chat style updates (#3469) Marcus Pasell
[7441321] [pay-1214] add patch to fix inverted list ANR bug (#3457) Randy Schott
[018ff3b] [PAY-1291] Adds new message toast when scrolled up on mobile (#3463) Randy Schott
[73b3ee0]  Add developer apps page, call new SDK developer apps + grants APIs [C-2624] (#3396) nicoback2
[09f08b3] [PAY-1294] Max length for chat text input on mobile (#3465) Reed
[ec305cb] [PAY-1278] Indicator for end of chat history on mobile (#3461) Reed
[593914c] Filter out self from create chat search results on mobile (#3462) Reed
[a42e359] Fix input with explicit input props (#3464) Dylan Jeffers
[5ada3f5] [PAY-1138] Fix headers on Chats and fix old header prod bug (#3442) Michael Piazza
[8966c0d] [C-2648] Add redesigned playlist management flow (#3456) Dylan Jeffers
[5fa7468] [PAY-1297] DMs: Don't show current user in search results (#3460) Marcus Pasell
[4a9824c] [C-2635] Fix offline playback; broken signature fetch (#3459) Andrew Mendelsohn
[d93537b] [PAY-1246] Mobile delete chat thread UI (#3458) Reed
[12107d4] [PAY-1288] DMs: Show max length in composer (#3454) Marcus Pasell
[9f8b112] [PAY-1276] Mobile chats change color on press (#3446) Reed
[bb53df1] [C-2646] Add idListArgKey for lists of entities; add fetchArgs types (#3452) Andrew Mendelsohn
[a954dce] [INF-415] Upgrade to react-native 0.71.8 (#3429) Sebastian Klingler
[1591fb2] Retry CodePush installs if they failed the first time C-2659 (#3451) nicoback2
[23f574b] Feature flag unread messages notif bubble (#3453) 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