-
Notifications
You must be signed in to change notification settings - Fork 92
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-4912] Calculate node based unattributed storage (Azure) #5066
Conversation
/retest |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5066 +/- ##
=======================================
- Coverage 94.1% 94.1% -0.0%
=======================================
Files 371 371
Lines 30929 30938 +9
Branches 4542 4543 +1
=======================================
+ Hits 29107 29113 +6
- Misses 1163 1165 +2
- Partials 659 660 +1 |
koku/masu/database/trino_sql/reporting_ocpazurecostlineitem_daily_summary.sql
Outdated
Show resolved
Hide resolved
…ily_summary.sql Co-authored-by: Michael Skarbek <[email protected]>
koku/masu/database/sql/reporting_ocpazure_ocp_infrastructure_back_populate.sql
Outdated
Show resolved
Hide resolved
koku/masu/database/sql/reporting_ocpazure_ocp_infrastructure_back_populate.sql
Outdated
Show resolved
Hide resolved
koku/masu/database/sql/reporting_ocpazure_ocp_infrastructure_back_populate.sql
Outdated
Show resolved
Hide resolved
koku/masu/database/trino_sql/reporting_ocpazurecostlineitem_daily_summary.sql
Outdated
Show resolved
Hide resolved
koku/masu/database/trino_sql/reporting_ocpazurecostlineitem_daily_summary.sql
Outdated
Show resolved
Hide resolved
Successful Azure Smoke Run |
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.
some questions and comments:
koku/masu/database/trino_sql/reporting_ocpazurecostlineitem_daily_summary.sql
Show resolved
Hide resolved
koku/masu/database/trino_sql/reporting_ocpazurecostlineitem_daily_summary.sql
Outdated
Show resolved
Hide resolved
koku/masu/database/trino_sql/reporting_ocpazurecostlineitem_daily_summary.sql
Outdated
Show resolved
Hide resolved
koku/masu/database/trino_sql/reporting_ocpazurecostlineitem_daily_summary.sql
Outdated
Show resolved
Hide resolved
koku/masu/database/trino_sql/reporting_ocpazurecostlineitem_daily_summary.sql
Show resolved
Hide resolved
koku/masu/database/trino_sql/reporting_ocpazurecostlineitem_daily_summary.sql
Show resolved
Hide resolved
CASE | ||
WHEN max(persistentvolumeclaim) = '' | ||
THEN 'Storage unattributed' | ||
ELSE max(namespace) | ||
END as namespace, | ||
max(ocp.node) as node, |
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.
(question) What is the result of max(ocp.node)
here for claimless PVs? Below (in lines 461-564), when inserting for Storage unattributed
, the node is null, but here it seems like the node would be not null. Is that accurate?
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.
The node column is null in the ocp daily summary table for the claimless persistent volume. So, it would be null here too:
| node | persistentvolumeclaim | persistentvolume | storageclass | resource_id |
| NULL | | pv-volume_claimless | sc_disk_one | abc_pv-volume_claimless |
Jira Ticket
COST-3912
Description
This change will calculate the node based unattributed storage for Azure.
Testing
make create-test-customer
make load-test-customer-data test_source=Azure
Storage unattributed
namespace was populated:The claimless will be be 100% unattributed cost; however, we can check our other resource to see that the cost was split:
This will set it back to being False.
8. Resummarize the Azure source
9. Recheck the database to see if unattributed storage was added:
Release Notes
proposed release note
https://gist.github.com/myersCody/b300fea8db309e55d50a7bf020a8e4b8