-
Story
-
Resolution: Done
-
Major
-
None
-
None
Currently subscription watch uses SKUs in order to define subscription details (capacity per subscription, syspurpose attributes). Because of this, the only SKUs important to swatch are those that any customer has a subscription for.
In order to narrow the list of SKUs synced to SKUs in use by swatch, replace the ProductAllowlist.allProducts call to a query against distinct SKUs in existing records (SKUs for which a customer has >= 1 subscription). With this change, we remove a dependency on the allowlist.
DONE
- ProductAllowlist.allProducts is removed.
- Nightly offering sync operates against all previously known products instead of using the allowlist.
In order to sync a SKU on-demand, modify SubscriptionSyncController.syncSubscription to call OfferingSyncController.syncOffering when offeringRepository.existsById(sku) call fails. Note: we need to handle the case where two processes simultaneously insert an offering (we should tolerate a failing insert by fetching what was inserted). With this change, an offering will be loaded into the swatch DB the first time we process a subscription referencing it.
Additionally, refactor OfferingSyncController.syncAllOfferings to query the list of known SKUs via OfferingRepository (needs a new method).
The allowlist will continue to be used to filter out subscriptions for SKUs not in the allowlist.
The nightly sync would continue to operate until the UMB integration is enabled, in order to capture any changes in SKU attributes.
- blocks
-
SWATCH-788 Refactor all references from ProductAllowlist to ProductDenylist
- Closed
- is related to
-
SWATCH-708 [Spike] design a replacement for allowlist in ProductAllowlist.allProducts.
- Closed