-
Task
-
Resolution: Unresolved
-
Critical
-
None
-
None
-
None
-
3
-
False
-
-
False
-
subs-swatch-lightning
-
-
When swatch-tally produces daily snapshots, it creates multiple snapshots for different filter dimensions (SLA, Usage). For example, one snapshot might represent "all usage" (_ANY/_ANY) while another might represent a specific SLA/Usage combination like Self-Support/Development/Test. Each of these snapshots is then enriched with subscription capacity by swatch-contracts and checked for over-usage by swatch-utilization.
The problem is in how swatch-contracts looks up subscription capacity. The SubscriptionCapacityService.buildSpecificationForSnapshot() method hardcodes ServiceLevel._ANY and Usage._ANY when searching for capacity, completely ignoring the SLA and Usage dimensions of the snapshot being processed. This means that a snapshot for Self-Support/Development/Test usage gets compared against the capacity of subscriptions that are actually Standard/Production – subscriptions that don't cover that SLA/Usage combination at all.
More context: https://docs.google.com/document/d/1UbphvA0ydHw7E-1D4I-YQLnGn8Im1WxxLzDhVAkUF6Y/edit?tab=t.5ite0o303v41
Initial pull request: https://github.com/RedHatInsights/rhsm-subscriptions/pull/5814
Acceptance Criteria
- Update the swatch-contracts test plan to reproduce the above scenario
- Implement the component test for the newly created test plan
- Fix the filtering issue
- blocks
-
SWATCH-4620 Validate the email content
-
- Closed
-
- is caused by
-
SWATCH-4620 Validate the email content
-
- Closed
-
- is triggered by
-
SWATCH-4600 Verify subscription usage notifications in production
-
- To Do
-