From 5b4d6ffc138ffe8ef860ced0afac1e2202aec68d Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Sat, 21 Feb 2026 14:24:59 -0500 Subject: [PATCH] fix: call update_s3_acls after karaoke track upload All three karaoke upload paths (single product upload, async backfill, CLI backfill script) now call update_s3_acls after writing tracks to S3, ensuring karaoke track ACLs match the product's current visibility. --- make_post_sell/lib/karaoke.py | 1 + make_post_sell/scripts/backfill_karaoke.py | 1 + make_post_sell/views/product.py | 1 + 3 files changed, 3 insertions(+) diff --git a/make_post_sell/lib/karaoke.py b/make_post_sell/lib/karaoke.py index ec1b971..d861c2d 100644 --- a/make_post_sell/lib/karaoke.py +++ b/make_post_sell/lib/karaoke.py @@ -475,6 +475,7 @@ def backfill_karaoke_async(shop_id, session_factory, app_settings): product.file_bytes = tmp session.add(product) session.commit() + product.update_s3_acls(s3, bucket) log.info(" OK %s (inst=%dB, vox=%dB)", title, sizes["instrumentals"], sizes["vocals"]) else: log.warning(" FAILED %s after %d attempts", title, MAX_RETRIES) diff --git a/make_post_sell/scripts/backfill_karaoke.py b/make_post_sell/scripts/backfill_karaoke.py index ad1a475..abcbf12 100644 --- a/make_post_sell/scripts/backfill_karaoke.py +++ b/make_post_sell/scripts/backfill_karaoke.py @@ -70,6 +70,7 @@ def backfill(env, dry_run=True): product.file_bytes = tmp dbsession.add(product) dbsession.flush() + product.update_s3_acls(s3, bucket) print(f" OK (instrumentals: {sizes['instrumentals']}B, vocals: {sizes['vocals']}B)") processed += 1 else: diff --git a/make_post_sell/views/product.py b/make_post_sell/views/product.py index 28f0469..f613489 100644 --- a/make_post_sell/views/product.py +++ b/make_post_sell/views/product.py @@ -390,6 +390,7 @@ def product_edit(request): product.file_bytes = tmp request.dbsession.add(product) request.dbsession.flush() + product.update_s3_acls(request.secure_uploads_client, request.app["bucket.secure_uploads"]) # redirect back to this page to clear # the params posted by the s3 webhooks.