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

Remove productAllowlist.allProducts

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • BIZ-579 - Create a deny-list for misbehaved subscriptions in Subscription Watch

      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.

              kflahert@redhat.com Kevin Flaherty
              khowell@redhat.com Kevin Howell
              Trayvon McKnight Trayvon McKnight
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: