-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[fix] Allow es-index-cleaner to delete indices based on current time #6790
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
Conversation
Signed-off-by: SatyamAgrawal <[email protected]>
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.
Code Review
The pull request updates the es-index-cleaner to delete indices based on the current time, resolving issue #6236. The change replaces the previous logic that calculated the deletion date based on tomorrow's midnight with a calculation based on the current time. This seems like a good change, but I have a question about it.
Summary of Findings
- Timezone Considerations: The code uses
time.Now().UTC()
to determine the current time. While this ensures consistency, it's important to verify that the Elasticsearch indices are also created using UTC time. If the indices are created using a different timezone, the deletion logic might not work as expected.
Merge Readiness
The code change appears straightforward and addresses the intended issue. However, it's crucial to ensure that the Elasticsearch indices are created using UTC time to avoid any unexpected behavior. I am unable to approve this pull request, and recommend that others review and approve this code before merging.
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 change looks ok but it's a breaking change that should be handled according to our policy that is documented in CONTRIBUTING.
…breaking change Signed-off-by: SatyamAgrawal <[email protected]>
…xDeletion Signed-off-by: SatyamAgrawal <[email protected]>
2b6b2bd
to
585325a
Compare
@yurishkuro PTAL |
Please include evidence of testing |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6790 +/- ##
==========================================
- Coverage 96.06% 96.04% -0.03%
==========================================
Files 364 365 +1
Lines 20712 20720 +8
==========================================
+ Hits 19897 19900 +3
- Misses 622 626 +4
- Partials 193 194 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
… function Signed-off-by: SatyamAgrawal <[email protected]>
Signed-off-by: SatyamAgrawal <[email protected]>
f52b9c4
to
5a9f3fe
Compare
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
…aegertracing#6790) ## Which problem is this PR solving? - Resolves jaegertracing#6236 ## Description of the changes - Changes the es-index-cleaner to remove indices older than 24 hours from the time it runs, so deletions happen hourly instead of just at midnight. ## How was this change tested? - CI ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: SatyamAgrawal <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]>
…aegertracing#6790) ## Which problem is this PR solving? - Resolves jaegertracing#6236 ## Description of the changes - Changes the es-index-cleaner to remove indices older than 24 hours from the time it runs, so deletions happen hourly instead of just at midnight. ## How was this change tested? - CI ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: SatyamAgrawal <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]> Signed-off-by: amol-verma-allen <[email protected]>
Which problem is this PR solving?
Description of the changes
How was this change tested?
Checklist
jaeger
:make lint test
jaeger-ui
:npm run lint
andnpm run test