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

Implement storage- and relationship-aware cleanup #973

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Swatinem
Copy link
Contributor

This implements a generic mechanism to resolve the model relationship graph based on Django metadata. That graph is then sorted in topological order, and all models are being deleted. Special manual deletion code is written for all the models that have some files in storage, in order to make sure that files are also being cleaned up properly.


This is work towards codecov/engineering-team#1127

This implements a generic mechanism to resolve the model relationship graph based on Django metadata.
That graph is then sorted in topological order, and all models are being deleted.
Special manual deletion code is written for all the models that have some files in storage, in order to make sure that files are also being cleaned up properly.
@Swatinem Swatinem self-assigned this Dec 19, 2024
@codecov-notifications
Copy link

Codecov Report

Attention: Patch coverage is 35.29412% with 77 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
services/cleanup/models.py 0.00% 56 Missing ⚠️
services/cleanup/cleanup.py 0.00% 16 Missing ⚠️
services/cleanup/relations.py 87.50% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link

✅ All tests successful. No failed tests were found.

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 35.29412% with 77 lines in your changes missing coverage. Please review.

Project coverage is 97.76%. Comparing base (7b243ab) to head (2dc9ed9).
Report is 6 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
services/cleanup/models.py 0.00% 56 Missing ⚠️
services/cleanup/cleanup.py 0.00% 16 Missing ⚠️
services/cleanup/relations.py 87.50% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #973      +/-   ##
==========================================
- Coverage   97.98%   97.76%   -0.22%     
==========================================
  Files         443      448       +5     
  Lines       35819    35978     +159     
==========================================
+ Hits        35096    35175      +79     
- Misses        723      803      +80     
Flag Coverage Δ
integration 42.04% <5.88%> (-0.13%) ⬇️
unit 90.43% <35.29%> (-0.20%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

⚠️ Impact Analysis from Codecov is deprecated and will be sunset on Jan 31 2025. See more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant