Skip to content
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-4906] Update resource matching to use CSI volume handle #5132

Merged
merged 17 commits into from
May 30, 2024

Conversation

myersCody
Copy link
Contributor

Jira Ticket

COST-4906

Description

This change will update the resource matching to use the CSI volume handle

Testing

  1. Checkout Branch
  2. pip install --dev
  3. load test customer data for Azure
    4:
postgres=# select distinct(persistentvolume) from reporting_ocpazurecostlineitem_project_daily_summary_p;
     persistentvolume
---------------------------
 pvc-partial-matching

 pvc-volume_3
 pv-volume-handle-with-pvc
 pvc-volume_4

The pv-volume-handle-with-pvc volume is preset in the ocp on azure daily summary table.

TODO:

  • Pull the migration out into a separate PR.

Release Notes

  • proposed release note
* [COST-####](https://issues.redhat.com/browse/COST-####) Fix some things

@myersCody myersCody added the BLOCKED This issue is currently blocked. label May 22, 2024
@myersCody myersCody added azure-smoke-tests pr_check will build the image and run azure + ocp on azure smoke tests and removed BLOCKED This issue is currently blocked. labels May 29, 2024
@myersCody
Copy link
Contributor Author

/retest

@myersCody myersCody marked this pull request as ready for review May 29, 2024 13:26
@myersCody myersCody requested review from a team as code owners May 29, 2024 13:26
lcouzens
lcouzens previously approved these changes May 29, 2024
Copy link

codecov bot commented May 29, 2024

Codecov Report

Attention: Patch coverage is 91.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 94.1%. Comparing base (3dcf7df) to head (1152c0d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #5132     +/-   ##
=======================================
- Coverage   94.1%   94.1%   -0.0%     
=======================================
  Files        376     376             
  Lines      31308   31317      +9     
  Branches    3756    3759      +3     
=======================================
+ Hits       29467   29471      +4     
- Misses      1173    1177      +4     
- Partials     668     669      +1     

)
WHERE ocp.source = {{ocp_source_uuid}}
AND ocp.year = {{year}}
AND lpad(ocp.month, 2, '0') = {{month}} -- Zero pad the month when fewer than 2 characters
AND ocp.usage_start >= {{start_date}}
AND ocp.usage_start < date_add('day', 1, {{end_date}})
AND (ocp.resource_id IS NOT NULL AND ocp.resource_id != '')
AND (ocp.resource_id IS NOT NULL AND ocp.resource_id != '') -- This prevents claimless
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: i'm not sure what this comment is telling me, claimless?

Copy link
Contributor Author

@myersCody myersCody May 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claimless is PVs that do not have a PVC associated with them. I have updated the comment to provide more clarity around that.

lcouzens
lcouzens previously approved these changes May 29, 2024
@myersCody
Copy link
Contributor Author

Azure run had 4 errors related to timeouts: https://ci.ext.devshift.net/job/koku-pipeline-pr-check-main/2360/
Restarting tests.

Copy link
Member

@maskarb maskarb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment:

koku/masu/database/ocp_report_db_accessor.py Outdated Show resolved Hide resolved
maskarb
maskarb previously approved these changes May 29, 2024
@myersCody
Copy link
Contributor Author

/retest

@myersCody
Copy link
Contributor Author

@myersCody myersCody added hot-fix-smoke-tests pr_check label to run minimal smoke tests for fast moving bug-fix and removed azure-smoke-tests pr_check will build the image and run azure + ocp on azure smoke tests labels May 30, 2024
@myersCody myersCody enabled auto-merge (squash) May 30, 2024 19:08
@myersCody myersCody merged commit 883132d into main May 30, 2024
11 checks passed
@myersCody myersCody deleted the COST-4906-csi-volume-handle-resource-matching branch May 30, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hot-fix-smoke-tests pr_check label to run minimal smoke tests for fast moving bug-fix smokes-required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants