-
Notifications
You must be signed in to change notification settings - Fork 45
SRCH-6172 Delete by query for both Elasticsearch and OpenSearch #1908
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
base: main
Are you sure you want to change the base?
Conversation
selfdanielj
left a comment
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.
Functionality works great! I was able to run the test script and confirm that data older than the number of days is deleted while data newer than that was not. Left a couple of questions.
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.
In general the loops waiting functionality this seems over-engineered. The job handle failures and retries just fine automatically.
|
@stevenbarragan Thanks for the review! Can you re-review the |
stevenbarragan
left a comment
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.
Thanks for adding the test. I have requested some changes that I think are extra.
| ] | ||
|
|
||
| clusters.each do |cluster| | ||
| puts "Waiting for #{cluster[:name]} to be ready..." |
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.
There is already a wait for opensearch operation on circleci
search-gov/.circleci/config.yml
Line 59 in 660fe69
| wait_for_opensearch: |
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.
I saw you added a wait_for_elasticsearch step to circleci, so we don't need to do it in here anymore
selfdanielj
left a comment
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.
I was able to verify functionality in both opensearch and elasticsearch!
I know i missed some converstations but was there still a plan to support a -1 retention value that would prevent the scheduler from running?
stevenbarragan
left a comment
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.
No need to re-initiate OPENSEARCH_CLIENT.
| # omniauth_login_dot_gov gem. | ||
| # | ||
| # The elasticsearch-ruby gem is compatible with OpenSearch. | ||
| OPENSEARCH_CLIENT = Elasticsearch::Client.new( |
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 OpenSearch client for both regular searches and analytics are defined here. Please remove this file.
| ] | ||
|
|
||
| clusters.each do |cluster| | ||
| puts "Waiting for #{cluster[:name]} to be ready..." |
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.
I saw you added a wait_for_elasticsearch step to circleci, so we don't need to do it in here anymore
Basic testing:
SEARCHELASTIC_RETENTION_DAYSare deletedChecklist
Please ensure you have addressed all concerns below before marking a PR "ready for review" or before requesting a re-review. If you cannot complete an item below, replace the checkbox with the⚠️
:warning:emoji and explain why the step was not completed.Functionality Checks
You have merged the latest changes from the target branch (usually
main) into your branch.Your primary commit message is of the format SRCH-#### <description> matching the associated Jira ticket.
PR title is either of the format SRCH-#### <description> matching the associated Jira ticket (i.e. "SRCH-123 implement feature X"), or Release - SRCH-####, SRCH-####, SRCH-#### matching the Jira ticket numbers in the release.
Automated checks pass. If Code Climate checks do not pass, explain reason for failures:
Process Checks