-
Notifications
You must be signed in to change notification settings - Fork 715
fix: self-org-trigger issues (main) #9348
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
Conversation
Signed-off-by: Yashodhan Joshi <[email protected]>
|
Failed to generate code suggestions for PR |
Greptile OverviewGreptile SummaryThis PR fixes two critical issues with self-reporting trigger ingestion: Key Changes:
Implementation Details: Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Queue as ReportingQueue
participant Ingest as ingest_buffered_data
participant OrgCheck as organization::is_org_in_free_trial_period
participant IngestionSvc as ingestion::ingest_reporting_data
Note over Queue,Ingest: Buffered triggers arrive
Queue->>Ingest: triggers (Vec<json::Value>)
alt additional_reporting_orgs configured
Note over Ingest: Send to configured orgs (META_ORG, etc.)
loop for each additional_reporting_org
Ingest->>IngestionSvc: ingest_reporting_data(triggers.clone(), trigger_stream)
end
end
alt usage_report_to_own_org enabled && mode != "remote"
Note over Ingest: Group triggers by org
loop for each trigger in triggers
Ingest->>Ingest: Parse TriggerData from JSON
alt cloud feature enabled
Ingest->>OrgCheck: is_org_in_free_trial_period(org_id)
OrgCheck-->>Ingest: Ok(ongoing) or Err(e)
alt !ongoing or error
Note over Ingest: Skip this trigger (expired org)
end
end
Note over Ingest: Add trigger to per_org_map[org_id]
end
loop for each (org, values) in per_org_map
Ingest->>IngestionSvc: ingest_reporting_data(values, trigger_stream)
Note over Ingest: Each org's triggers ingested separately
end
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, no comments
cherry-pick of #9348 for release branch --------- Signed-off-by: Yashodhan Joshi <[email protected]> Co-authored-by: Yashodhan Joshi <[email protected]>
This fixes two issues for reporting triggers to own org :