-
-
Notifications
You must be signed in to change notification settings - Fork 52
feat: Save rule results against collection log #1705
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
base: main
Are you sure you want to change the base?
Conversation
/release-pr |
Released to |
98a8d08
to
746fa03
Compare
/release-pr |
Released to |
f038e6e
to
0b19d3b
Compare
/release-pr |
Released to |
/release-pr |
Released to |
/release-pr |
Released to |
/release-pr |
Released to |
/release-pr |
Released to |
78a2111
to
bc457d3
Compare
/release-pr |
Released to |
/release-pr |
Released to |
If a getter returns undefined, which is the case when an exception occurs, the rule result is ignored. This can lead to undesired behaviour as media could be removed or added when it wasn't expected to be.
When getters return undefined, or rule comparison fails, we would skip over the rule completely, essentially returning a true result. This could result in media being incorrectly actioned, should the failure persist for the configured take action after days. It also means that temporary issues, such as an API being unavaliable, could cause an add or remove action because of the logic change. This action would subsequently be reversed on the next rule handler execution. With the recent addition of API retries this should hopefully not be much of an issue, though we still need to add retries to the Plex API. With this change, an error occuring in a rule for a media item will stop further rule evaulation for it, treating it as a 'false' result.
The error message is parsed further up the stack which isn't the nicest, but we'll fix that later.
The returned collection is saved again in the caller which re-introduced the Plex ID as it wasn't being unset.
As async forEach loops all run concurrently, we could've hit race conditions within the addToCollection and removeFromCollection functions when sycning manual items. I've also added additional error handling to stop processing a rule if it errors out.
b8bdf83
to
24400da
Compare
/release-pr |
Released to |
/release-pr |
Released to |
/release-pr |
Released to |
9c773d5
to
a949e58
Compare
/release-pr |
Released to |
/release-pr |
Released to |
This is #1702 but based off of v2.16.0 for users to test.
This should not be merged. Instead I will cherry-pick confirmed fixes out into their own PRs.