-
Task
-
Resolution: Unresolved
-
Critical
-
None
-
None
-
None
-
5
-
False
-
-
False
-
subs-swatch-thunder
-
-
-
Swatch Thunder Sprint 6, Swatch Thunder Sprint 7
Context
This issue was identified during IQE integration testing for SWATCH-175. The goal is to ensure that PAYG products only receive HOURLY TallySummary messages, while maintaining the existing behavior for non-PAYG products.
Problem
During IQE integration testing for SWATCH-175 (Notifications integration), we discovered that swatch-tally's hourly process is creating two TallySummary messages (HOURLY and DAILY) for PAYG products. For PAYG products, only HOURLY TallySummary messages should be produced.
This issue has the following impacts:
- swatch-contracts is processing more messages than expected (two TallySummary messages instead of one for PAYG products)
- This is causing duplicate notification message generation because the hardware_measurement_type is used as part of the hash to indicate uniqueness
- The workaround filter in swatch-utilization adds technical debt that needs to be cleaned up
Root Cause
This issue stems from a misunderstanding of requirements. The original ask was for hourly to produce DAILY TallySummary messages as well, which was intended to accumulate HOURLY data into DAILY snapshots. However, this behavior was meant for non-PAYG products, not PAYG products.
For PAYG products like ROSA, only HOURLY TallySummary messages are expected and should be produced.
Current Workaround
As a temporary workaround, swatch-utilization currently has a filter that ignores DAILY granularity TallySummary messages for PAYG products. This filter should be removed once this issue is resolved (see related card to be created by Jose Carvajal Hilario).
Expected Behavior
- PAYG products (e.g., ROSA): Only HOURLY TallySummary messages should be produced by the hourly tally process
- Non-PAYG products: Continue to produce
both HOURLY andDAILY TallySummary messages (no change to current behavior) - Nightly tally: Continue to produce DAILY snapshots for non-PAYG products (no change to current behavior)
- When a snapshot is created, the TallySummary that gets should be produced should be for the finest granularity snapshot (based on the product tag config) that was created
Implementation Notes
- This is NOT a reversion of previous work - DAILY snapshots are still needed for non-PAYG products
- The change involves removing the extra DAILY TallySummary message sent by the hourly process specifically for PAYG products
- The nightly tally process should continue to send DAILY TallySummary messages for non-PAYG products as before
Acceptance Criteria
- Code changes implemented
- PAYG products only receive HOURLY TallySummary messages from hourly tally process
- Non-PAYG products continue to receive both HOURLY and DAILY TallySummary messages (no regression)
- Update swatch-tally Test Plan to account for this new functionality
- Update swatch-tally automated tests in accordance with Test Plan changes
- Update swatch-utilization Test Plan to account for this new functionality
- Update swatch-utilization automated tests in accordance with Test Plan changes
- All existing automated tests pass
- New automated tests validate the expected behavior for both PAYG and non-PAYG products
Out of Scope
- Remove workaround filter in swatch-utilization
- blocks
-
SWATCH-4016 Deploy swatch-utilization into production
-
- Backlog
-
-
SWATCH-4335 Remove granularity filter for PAYG products in swatch-utilization validation
-
- Backlog
-
- incorporates
-
SWATCH-4324 Revisit the Utilization Test Plan to include changes
-
- Closed
-
- is blocked by
-
SWATCH-4334 Remove filter on DAILY granularity TallySummary messages in swatch-utilization for PAYG products
-
- Closed
-
- is related to
-
SWATCH-4323 DAILY TallySummary shouldn't include a measurements TOTAL block
-
- In Progress
-
-
SWATCH-3791 Update swatch-tally to emit tally summaries with granularities HOURLY and DAILY
-
- Release Pending
-