fix(metadata): pass parent context to ResolveAnime to avoid canceled ctx#239
fix(metadata): pass parent context to ResolveAnime to avoid canceled ctx#239HichamLL04 wants to merge 2 commits into
Conversation
After the parallel TMDB metadata fan-out (external_ids, translations, videos, keywords, credits), errgroup cancels the derived gctx. ResolveAnime was accidentally receiving this already-canceled context, causing every AniList search to abort immediately and the MAL ID to never be resolved. Fix: pass the saved requestCtx (captured before errgroup shadowed ctx) so AniList searches run on a live context. Also fix anilistMedia.SeasonYear JSON field type: the AniList API returns an integer, so parse it as int and convert to string only when non-zero.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAniList season years now decode numerically and are conditionally mapped to metadata. Anime resolution receives the original request context, while tests gain logging and pointer helpers. ChangesMetadata handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
After the parallel TMDB metadata fan-out (external_ids, translations, videos, keywords, credits), errgroup cancels the derived gctx. ResolveAnime was accidentally receiving this already-canceled context, causing every AniList search to abort immediately and the MAL ID to never be resolved.
Fix: pass the saved requestCtx (captured before errgroup shadowed ctx) so AniList searches run on a live context.
Also fix anilistMedia.SeasonYear JSON field type: the AniList API returns an integer, so parse it as int and convert to string only when non-zero.
Summary by CodeRabbit