feat: delete rows from a new table for event persistence - #1575
Conversation
|
Warning Review limit reached
More reviews will be available in 33 minutes and 6 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds the ChangesDrools Event Record Cleanup
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/aap_eda/services/activation/drools_cleanup.py`:
- Line 253: The integration test that asserts the output shape and DELETE call
count for the function _delete_rows_by_ha_uuid must be updated to include the
new table key "drools_ansible_event_record" and to expect five DELETE calls
instead of four; locate the test that currently asserts exactly 4 keys and 4
DELETE FROM calls (the test covering drools cleanup) and add the new key to the
expected result map and change the expected delete count to 5 so the test
reflects the updated deletion behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: 35b2c5c1-509d-4466-ab43-bcfbf742a7f5
📒 Files selected for processing (1)
src/aap_eda/services/activation/drools_cleanup.py
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #1575 +/- ##
=======================================
Coverage 92.37% 92.37%
=======================================
Files 244 244
Lines 11219 11219
=======================================
Hits 10363 10363
Misses 856 856
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
drools creates event records in a new table called drools_ansible_event_record When an activation is deleted we have to cleanup the records related to this Activation https://redhat.atlassian.net/browse/AAP-77231
|



drools creates event records in a new table called drools_ansible_event_record
When an activation is deleted we have to cleanup the records related to this Activation
https://redhat.atlassian.net/browse/AAP-77231
To test it enable event persistence and generate some events check the records in the Event Persistence Database.
Delete the Activation and the related rows for the Activation should get deleted.
Summary by CodeRabbit
Bug Fixes
Tests