Add Event.grouping field and fill it

An event always has a single (automatically calculated) Grouping associated with it.
We add this info to the Event model (we'll soon display it in the UI, and as per the
now-removed comment it's simply the consistent thing to do)
This commit is contained in:
Klaas van Schelven
2025-01-31 15:51:24 +01:00
parent c42aa9118a
commit 9ee623de6b
6 changed files with 72 additions and 4 deletions

View File

@@ -270,14 +270,13 @@ class BaseIngestAPIView(View):
# "what is a limit anyway, if you can go either over it, or work is done before the limit is reached")
evict_for_max_events(project, digested_at, project_stored_event_count)
# NOTE: an event always has a single (automatically calculated) Grouping associated with it. Since we have that
# information available here, we could add it to the Event model.
event, event_created = Event.from_ingested(
event_metadata,
ingested_at,
issue.digested_event_count,
issue_stored_event_count,
issue,
grouping,
event_data,
denormalized_fields,
)