project-koku / masu

This is a READ ONLY repo. See https://github.com/project-koku/koku for current masu implementation
GNU Affero General Public License v3.0
5 stars 6 forks source link

matching on pod name matches for OCP Storage daily table #455

Closed dccurtis closed 5 years ago

dccurtis commented 5 years ago

The OCP Storage daily summary table was doing a LEFT JOIN when determining what nodes a OpenShift volume is running on. This was causing The node name of NULL to be allowed in the storage daily table. I believe we should be a JOIN here since we only want to match when pod names are aligned between storage and usage.

Because of this the database had NULL values for node and was leading to the 500 seen here: https://github.com/project-koku/koku/issues/867

Testing

  1. Ingest OCP data with matched pod name for storage and usage
  2. Verify that a group_by[node] && order_by[node] query is successful.
  3. Ingest data with misaligned pod names for storage and usage.
  4. Verify that a group_by[node] && order_by[node] query is successful.

Test Results koku_issue_867_ut.txt

codecov[bot] commented 5 years ago

Codecov Report

Merging #455 into master will increase coverage by 0.1%. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #455     +/-   ##
========================================
+ Coverage    97.7%   97.8%   +0.1%     
========================================
  Files          66      66             
  Lines        3700    3700             
  Branches      388     388             
========================================
+ Hits         3616    3618      +2     
+ Misses         50      49      -1     
+ Partials       34      33      -1
Impacted Files Coverage Δ
masu/util/hash.py 88.9% <0%> (+7.4%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0e6e16c...cfb6325. Read the comment docs.

dccurtis commented 5 years ago

Closing in favor of https://github.com/project-koku/koku/pull/883