Skip to content

Commit

Permalink
add more undocumented relations
Browse files Browse the repository at this point in the history
  • Loading branch information
Swatinem committed Jan 20, 2025
1 parent 1d61cc3 commit 40ba152
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions services/cleanup/relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

from django.db.models import Model, Q
from django.db.models.query import QuerySet
from shared.django_apps.bundle_analysis.models import CacheConfig
from shared.django_apps.codecov_auth.models import Owner, OwnerProfile
from shared.django_apps.core.models import Commit, Pull, Repository
from shared.django_apps.reports.models import DailyTestRollup, TestInstance
from shared.django_apps.user_measurements.models import UserMeasurement

# Relations referencing 0 through field 1 of model 2:
IGNORE_RELATIONS: set[tuple[type[Model], str, type[Model]]] = {
Expand All @@ -22,6 +24,12 @@
UNDOCUMENTED_RELATIONS: set[tuple[type[Model], str, type[Model]]] = {
(Repository, "repoid", TestInstance),
(Repository, "repoid", DailyTestRollup),
(Commit, "commit_id", UserMeasurement),
(Owner, "owner_id", UserMeasurement),
(Repository, "repo_id", UserMeasurement),
(Repository, "repo_id", CacheConfig),
# TODO: `UserMeasurement` also has `upload_id`, should we register that as well?
# TODO: should we also include `SimpleMetric` here?
}


Expand Down

0 comments on commit 40ba152

Please sign in to comment.