cnf ran ptp: make OC cases events-optional #1165
cnf ran ptp: make OC cases events-optional #1165klaskosk wants to merge 2 commits intorh-ecosystem-edge:mainfrom
Conversation
|
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a concurrent event+metric assertion framework, gates consumer operations when PTP event publishing is disabled, renames an events option to include-current-state semantics, introduces ServiceMonitor update/restore utilities for 1s scraping, and migrates many PTP tests from direct event-pod waits to the new assertion-based checks. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
f05fd4e to
a2c0c7c
Compare
|
@coderabbitai pause |
✅ Actions performedReviews paused. |
70b5293 to
956787b
Compare
b3b1f20 to
19c18e1
Compare
This commit adds the ability to update the ServiceMonitor for PTP and then restore it. By default, metrics are collected only every 30 seconds, which limits the resolution we have in these tests. After this change, Prometheus will have second-by-second changes to the metrics. There are small downsides in the form of CPU usage for Prometheus, but this should not be an issue since we are measuring functionality, not performance. Assisted-by: Cursor
This commit uses the eventmetric package to fallback to metric assertions whenever PTP events are not enabled. Additionally, it flips the semantics of CurrentState. By default, the CurrentState logs are excluded since they don't represent events being sent to the consumer. They may be explicitly enabled when desired. There are a few complexities still, such as some assertions needing to be events-only due to the metric being too transient to capture. Additionally, the tests will now configure the ServiceMonitor such that Prometheus scrapes the metrics every second instead of the default 30 seconds. This improves the precision of metric assertions. Assisted-by: Cursor
19c18e1 to
28b5fd2
Compare
This commit uses the eventmetric package to fallback to metric
assertions whenever PTP events are not enabled.
Additionally, it flips the semantics of CurrentState. By default, the
CurrentState logs are excluded since they don't represent events being
sent to the consumer. They may be explicitly enabled when desired.
Closes: CNF-21255
Depends-on: #1123
Assisted-by: Cursor
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Documentation
Breaking Changes