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-4907] Add temp table to track aws disk capacities #5262

Merged
merged 4 commits into from
Aug 20, 2024

Conversation

myersCody
Copy link
Contributor

Jira Ticket

COST-4907

Description

This change will add a temporary table for tracking aws disk capacities.

Testing

  1. Checkout Branch
  2. load test customer data for AWS
  3. select * from aws_openshift_disk_capacities_temp;
  4. TRINO SQL:
trino:org1234567> select * from aws_openshift_disk_capacities_temp;

Example return:

    resource_id    | capacity |       usage_start       |              ocp_source              | year | month
-------------------+----------+-------------------------+--------------------------------------+------+-------
 vol-12345672      |       20 | 2024-07-29 00:00:00.000 | eea292d8-7553-4462-89a3-ed48e5a99113 | 2024 | 07
 vol-123-claimless |       30 | 2024-08-11 00:00:00.000 | eea292d8-7553-4462-89a3-ed48e5a99113 | 2024 | 08
 vol-12345671      |       20 | 2024-08-12 00:00:00.000 | eea292d8-7553-4462-89a3-ed48e5a99113 | 2024 | 08
 vol-12345674      |       20 | 2024-08-12 00:00:00.000 | eea292d8-7553-4462-89a3-ed48e5a99113 | 2024 | 08
 vol-12345671      |       20 | 2024-08-13 00:00:00.000 | eea292d8-7553-4462-89a3-ed48e5a99113 | 2024 | 08
 vol-12345672      |       20 | 2024-08-11 00:00:00.000 | eea292d8-7553-4462-89a3-ed48e5a99113 | 2024 | 08

Release Notes

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

@myersCody myersCody self-assigned this Aug 13, 2024
@myersCody myersCody added the aws-smoke-tests pr_check will build the image and run aws + ocp on aws smoke tests label Aug 13, 2024
Copy link

codecov bot commented Aug 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.1%. Comparing base (582a248) to head (1f84381).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #5262     +/-   ##
=======================================
- Coverage   94.1%   94.1%   -0.0%     
=======================================
  Files        375     375             
  Lines      31422   31429      +7     
  Branches    4627    4627             
=======================================
+ Hits       29564   29570      +6     
- Misses      1187    1188      +1     
  Partials     671     671             

@myersCody myersCody marked this pull request as ready for review August 14, 2024 13:32
@myersCody myersCody requested review from a team as code owners August 14, 2024 13:32
@@ -162,6 +162,19 @@ CREATE TABLE IF NOT EXISTS hive.{{schema | sqlsafe}}.reporting_ocpawscostlineite
) WITH(format = 'PARQUET', partitioned_by=ARRAY['aws_source', 'ocp_source', 'year', 'month', 'day'])
;

{% if unattributed_storage %}
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to disable table creation? We didn't for Azure, I don't think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I put it behind unleash for now so that there is flexibility to add another column if needed later on in the process without having to run a trino migration. If it is a blocker I can remove the if though.

@myersCody myersCody merged commit 27b952a into main Aug 20, 2024
11 checks passed
@myersCody myersCody deleted the COST-4907-aws-disk-temp-table branch August 20, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws-smoke-tests pr_check will build the image and run aws + ocp on aws smoke tests smokes-required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants