fix(sonarr): unblock DELETE_SHOW_IF_EMPTY and surface cleanup skips#2763
Merged
Merged
Conversation
DELETE_SHOW_IF_EMPTY silently bailed when Seerr was configured but the show was not tracked in Seerr, and when every remaining Seerr request was already COMPLETED. hasRemainingSeasonRequests returned undefined for missing mediaInfo the same way it does for real communication errors, and the outer request filter kept COMPLETED requests in scope so their seasons were still scanned. - Treat a Seerr response with no mediaInfo as "nothing to protect" (returns false); keep undefined strictly for communication errors. - Exclude COMPLETED requests at the outer filter so fulfilled history does not block deletion. - Add a debug log at every bail path in deleteShowIfEmpty and unmonitorShowIfEmptyAndEnded so users can see why a show was kept. - Add spec coverage for: untracked show, empty requests, communication failure, Seerr state unknown from the handler, and files-still-remain. The PR #2618 design intent (Seerr is the authority when configured, ended shows included) is preserved. Fixes #2757
maintainerr-automation Bot
added a commit
that referenced
this pull request
Apr 24, 2026
* fix(sonarr): unblock DELETE_SHOW_IF_EMPTY and surface cleanup skips (#2763) DELETE_SHOW_IF_EMPTY silently bailed when Seerr was configured but the show was not tracked in Seerr, and when every remaining Seerr request was already COMPLETED. hasRemainingSeasonRequests returned undefined for missing mediaInfo the same way it does for real communication errors, and the outer request filter kept COMPLETED requests in scope so their seasons were still scanned. - Treat a Seerr response with no mediaInfo as "nothing to protect" (returns false); keep undefined strictly for communication errors. - Exclude COMPLETED requests at the outer filter so fulfilled history does not block deletion. - Add a debug log at every bail path in deleteShowIfEmpty and unmonitorShowIfEmptyAndEnded so users can see why a show was kept. - Add spec coverage for: untracked show, empty requests, communication failure, Seerr state unknown from the handler, and files-still-remain. The PR #2618 design intent (Seerr is the authority when configured, ended shows included) is preserved. Fixes #2757 * Add token for GitHub authentication in workflow Added token usage for authentication in docs drift workflow. * ci(docs-drift): remove create_pr step and input The draft PR was empty scaffolding — the drift issue already carries the same report and is the canonical tracking surface. Drop the unused create_pr dispatch input and the push/PR creation step. * ci(stale): use GITHUB_TOKEN for stale-issue bot The job already requests issues: write, which GITHUB_TOKEN satisfies — no need for the ACTIONS_TOKEN PAT. Dropping this removes the last workflow reference to ACTIONS_TOKEN. --------- Co-authored-by: enoch85 <mailto@danielhansson.nu>
Contributor
|
🎉 This PR is included in version 3.8.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2757.
DELETE_SHOW_IF_EMPTYsilently bailed when Seerr was configured but the show wasn't tracked in Seerr, or when all Seerr requests were alreadyCOMPLETED. The bail paths also had no logs, so users had nothing to debug with.Fix
hasRemainingSeasonRequests: returnfalsewhenmediaInfois null (show not tracked in Seerr — nothing to protect), keepundefinedonly for real communication failures.COMPLETEDrequests.debuglog at every bail path indeleteShowIfEmpty/unmonitorShowIfEmptyAndEnded.PR #2618's design intent (Seerr is the authority when configured, ended shows included) is preserved.
Test plan
yarn test --filter=@maintainerr/server— 1017 passyarn lint— clean