Fix container-event event_instance_id mismatch between stats_aggregator_fact and event_instance_fact - #83
Merged
Conversation
…nt_instance_fact - Use crc32(container_id) for ContainerEvent stats rows, while other event types keep the timestamp-based hash. - Strengthen integration test to assert every stats fact event_instance_id exists in event_instance_fact. - Add unit test verifying container-event id consistency and basic-event id divergence.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #83 +/- ##
==========================================
+ Coverage 88.99% 89.01% +0.01%
==========================================
Files 61 61
Lines 5199 5207 +8
Branches 627 628 +1
==========================================
+ Hits 4627 4635 +8
Misses 461 461
Partials 111 111
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…gator - Aligns PointValueAggregator with the StatsAggregator fix for container-event event_instance_id generation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
For a
CONTAINER_EVENT,stats_aggregator_factproduced a differentevent_instance_idthan
event_instance_factfor the same event.Cause
StatsAggregator._add_event_instance_id_columncalledgenerate_event_instance_id_columnwithout an event type, so container-event rows used the timestamp-based hash
(
crc32(container_id::event_name::start_ts::end_ts)) instead ofcrc32(container_id).Since timestamps vary per aggregation, the id fragmented.
Fix
Apply the
ContainerEventcase per row (keyed onstats_name, like the siblingmappers), routing through
generate_event_instance_id_column(event_type=ContainerEvent)so the id matches
event_instance_factby construction.Tests
test_persist_statistics_with_events, whose old assertion always passed.Test Plan
Checklist