Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-4322

Only emit HOURLY TallySummary for payg products

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • None
    • swatch-tally
    • None
    • 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 and DAILY 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

              rhn-engineering-wpoteat William Poteat
              lburnett0 Lindsey Burnett
              Lisa Walker Lisa Walker
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: