Skip to content

Commit

Permalink
[COST-5565] - Fix bug in old tag matching logic (#5429)
Browse files Browse the repository at this point in the history
* fix bug in tag matching logic
  • Loading branch information
lcouzens authored Dec 19, 2024
1 parent 94dbc09 commit 0babb2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions koku/masu/util/aws/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,9 +901,9 @@ def match_openshift_resources_and_labels(data_frame, cluster_topologies, matched
data_frame["special_case_tag_matched"] = False
tags = data_frame["resourcetags"]
if not tags.eq("").all():
tags = tags.str.lower()
tags_lower = tags.str.lower()
LOG.info("Matching OpenShift on AWS by tags.")
special_case_tag_matched = tags.str.contains(
special_case_tag_matched = tags_lower.str.contains(
"|".join(["openshift_cluster", "openshift_project", "openshift_node"])
)
data_frame["special_case_tag_matched"] = special_case_tag_matched
Expand Down
4 changes: 2 additions & 2 deletions koku/masu/util/azure/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ def match_openshift_resources_and_labels(data_frame, cluster_topologies, matched
data_frame["special_case_tag_matched"] = False
tags = data_frame["tags"]
if not tags.eq("").all():
tags = tags.str.lower()
tags_lower = tags.str.lower()
LOG.info("Matching OpenShift on Azure by tags.")
special_case_tag_matched = tags.str.contains(
special_case_tag_matched = tags_lower.str.contains(
"|".join(["openshift_cluster", "openshift_project", "openshift_node"])
)
data_frame["special_case_tag_matched"] = special_case_tag_matched
Expand Down

0 comments on commit 0babb2a

Please sign in to comment.