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

AO3-2197 Fix edge cases of chapter kudos cleanup #4293

Merged
merged 1 commit into from
Jul 17, 2022

Conversation

redsummernight
Copy link
Member

Issue

https://otwarchive.atlassian.net/browse/AO3-2197

Purpose

  • Expire kudos-related caches after re-saving kudos. Move kudos sweeper logic into model callbacks so we can use it outside controllers.
  • Set some kudos validations (not on own works, not guest on restricted) to run only on create, and not on cleanup. It's possible for e.g. guest kudos to exist on works that have not always been restricted.
  • Log chapter kudos that cannot be destroyed and chapter kudos that cannot be updated separately.
  • Destroy chapter kudos if the chapter's work does not exist.

Testing Instructions

See issue.

- Expire kudos-related caches after re-saving kudos. Move kudos sweeper
  logic into model callbacks so we can use it outside controllers.
- Set some kudos validations (not on own works, not guest on restricted)
  to run only on create, and not on cleanup. It's possible for e.g.
  guest kudos to exist on works that have not always been restricted.
- Log chapter kudos that cannot be destroyed and chapter kudos that
  cannot be updated separately.
- Destroy chapter kudos if the chapter's work does not exist.
@redsummernight redsummernight added the Priority: High - Broken on Test Merge immediately after approval label Jul 17, 2022
Comment on lines +965 to +966
indestructible_kudo_ids = []
unupdatable_kudo_ids = []
Copy link
Collaborator

Choose a reason for hiding this comment

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

This amuses me greatly.

@sarken sarken merged commit b39d3d7 into otwcode:master Jul 17, 2022
@redsummernight redsummernight deleted the AO3-2197-rake branch July 18, 2022 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants