-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[COST-5565] - dont match on empty resource ids (OCP/AWS managed tables) #5425
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5425 +/- ##
=======================================
- Coverage 94.2% 94.1% -0.0%
=======================================
Files 371 371
Lines 31542 31542
Branches 3378 3378
=======================================
- Hits 29698 29696 -2
- Misses 1198 1199 +1
- Partials 646 647 +1 |
@@ -105,6 +106,8 @@ cte_array_agg_volumes AS ( | |||
SELECT DISTINCT persistentvolume, csi_volume_handle | |||
FROM hive.{{schema | sqlsafe}}.openshift_storage_usage_line_items_daily | |||
WHERE source = {{ocp_source_uuid}} | |||
AND persistentvolume != '' | |||
AND csi_volume_handle != '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If customers have not updated their operator they will not have the csi_volume_handle. So, we need to account for the case where a persistentvolume has been populated, but the csi_volume_handle
has not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wondered if that might be a case!! Thanks. I originally just had the check on persistentvolume
but wasnt sure if that would be enough. Based on what your saying I think that would be the better approach here.
We do still need to prevent an empty csi_volume handle string on the condition though or it will always return true. Give this a try, I have not ran it so it may need some tweaking:
|
Jira Ticket
COST-5565
Description
This change will filter out OCP resources with an empty resource_id
''
Testing
Release Notes