Uploaded image for project: 'Cost Management'
  1. Cost Management
  2. COST-101

Move OpenShift on AWS special tag handling to occur first

XMLWordPrintable

    • COST Sprint 52, COST Sprint 53

      Describe the bug
      When matching OpenShift on AWS we match to three special case tags openshift_cluster, openshift_node and openshift_project. Currently we're doing this matching after the broader tag matching. Because these special tags are more specific we should match them first.

      To Reproduce
      Steps to reproduce the behavior:
      1. Create nise data that has multiple OpenShift clusters associated with a single AWS account
      2. Associate resources in both clusters and AWS using a specific tag (e.g. environment: dev)
      3. Tag the associated AWS resource with openshift_cluster using and associated with only 1 of the clusters
      4. Observe AWS cost get double counted

      Expected behavior
      Because the AWS resource has specified a specific cluster to associate to, the cost should only associate to that cluster.

      Additional context
      We just need to switch the order of a few blocks of SQL to ensure the more specific matching happens first.

      See: https://github.com/project-koku/koku/issues/1370

              aberglun@redhat.com Andrew Berglund (Inactive)
              jalberts@redhat.com Jennifer Albertson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: