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-5226] - Skip S3 delete (daily flow) if we have marked deletion complete. #5198

Merged
merged 4 commits into from
Jul 2, 2024

Conversation

lcouzens
Copy link
Contributor

@lcouzens lcouzens commented Jul 2, 2024

Jira Ticket

COST-5226

Description

This change will add an additional check inside get_or_clear_daily_s3_by_date to not only check if another worker has set the processing start date but also if the parquet files have been deleted.

The real change in this PR is really just this line if not manifest_accessor.get_s3_parquet_cleared(manifest):

I also included a small change to use get_s3_objects_not_matching_metadata instead of having duplicate logic to maintain.

Testing

  1. Checkout Branch
  2. Restart Koku with multiple workers
  3. Load AWS data (Needs to have multiple reports)
  4. Load new AWS data to simulate daily processing (with multiple ports)
  5. See first report handles the lookup/deletion
  6. see subsiquent workers skipp deletion step.

Release Notes

  • proposed release note
* [COST-5226](https://issues.redhat.com/browse/COST-5226) Improve daily deletion logic

@lcouzens lcouzens added the smoke-tests pr_check will build the image and run minimal required smokes label Jul 2, 2024
@lcouzens lcouzens requested review from a team as code owners July 2, 2024 11:22
Copy link

codecov bot commented Jul 2, 2024

Codecov Report

Attention: Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.

Project coverage is 94.2%. Comparing base (066faf6) to head (7426e34).

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #5198     +/-   ##
=======================================
- Coverage   94.2%   94.2%   -0.0%     
=======================================
  Files        376     376             
  Lines      31252   31247      -5     
  Branches    3734    3733      -1     
=======================================
- Hits       29429   29424      -5     
- Misses      1160    1161      +1     
+ Partials     663     662      -1     

@lcouzens lcouzens changed the title dont attempt more S3 deletes if we have marked deletion complete [COST-5226] - Skip S3 delete (daily flow) if we have marked deletion complete. Jul 2, 2024
@lcouzens
Copy link
Contributor Author

lcouzens commented Jul 2, 2024

/retest

@lcouzens lcouzens enabled auto-merge (squash) July 2, 2024 16:44
@lcouzens lcouzens merged commit 0507abb into main Jul 2, 2024
10 of 11 checks passed
@lcouzens lcouzens deleted the cost-daily-delete-check branch July 2, 2024 16:48
djnakabaale pushed a commit that referenced this pull request Jul 9, 2024
…complete. (#5198)

* dont attempt more S3 deletes if we have marked deletion complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
smoke-tests pr_check will build the image and run minimal required smokes smokes-required
Projects
None yet
2 participants