feat: delete rows from a new table for event persistence#1575
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
📝 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.17% 92.17%
=======================================
Files 244 244
Lines 11214 11214
=======================================
Hits 10337 10337
Misses 877 877
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