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

Remove use of product name while emitting usage

    XMLWordPrintable

Details

    Description

      Since product name support will be removed as a result we won't be able to get the value populated in product name during the subscription or offering sync.

      At the moment,  in the swatch code we check for product names a few places later, such as when we report usage information to AWS. However, since the product tag will be predetermined during the ingestion process after these two cards(SWATCH-1956, SWATCH-1928) are done, we should rely on the product_tag.

      Done:
      Remove the use of product name instead use product tag when we send the Billable usage to AWS.

       
      String productId = usageKey.getProductId();
          Set<String> productNames = Variant.getProductNamesForTag(productId);
          if (productNames.isEmpty()) {
            log.warn("No product names configured for tag: {}", productId);
            return Collections.emptyList();
          }
      

      This is testable using: /api/swatch-producer-aws/internal/aws/billable_usage (there should be no change in the results). 

      Attachments

        Issue Links

          Activity

            People

              karshah@redhat.com Kartik Shah
              karshah@redhat.com Kartik Shah
              Trayvon McKnight Trayvon McKnight
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: