-
Notifications
You must be signed in to change notification settings - Fork 195
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
ElasticSearch Availabilty Check and Mapping Self-Check #1045
Conversation
@bodo-hugo-barwich would you be able to rebase and squash this down to just the necessary commits? |
7f4d72b
to
c1b9756
Compare
c1b9756
to
5d9647c
Compare
I created a new issue to discuss the implementation of the functionality to fix a broken index at |
hi @bodo-hugo-barwich we are waiting for your action on the review comments. |
@bodo-hugo-barwich please check the current review comments that are pending. |
@mickeyn I'm looking at this thread and I only see "resolved" conversations - can you confirm those comments aren't "pending" because you haven't sent them? |
I moved the ElasticSearch Queries to 2 different methods, Please let me know if this is better so or anything else should be done still. |
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.
LGTM
The latest build is broken: https://app.circleci.com/pipelines/github/metacpan/metacpan-api/155/workflows/207d384b-844b-4e37-8da4-5b768480d256/jobs/164 Any chance it's related to this? (I haven't looked closely). |
The message :
Actually it is reproducible with
There is also a message that the test ended unexpectedly
Just running the test
Noticeable here is the ElasticSearch response with HTTP Error Code
The ElasticSearch error message:
which is actually the same incident as documented in the related issue #47 The part that is not quite clear yet is how the wrong So the saves way to proceed is to revert this commit and study this test again. |
I'm sorry.
That the
which can be reproduced with:
So the
which then will make the tests succeed:
Unfortunately this will not correctly propagate the application "exit code" to implement a fail fast logic and prevent index corruption as explained in the issue. |
I will refactor this and provide a better solution with it's corresponding tests. |
According to the master branch revision 50332b1 as of 2021-10-27 the ElasticSearch index status after the succeeded tests is expected to be:
|
The refactoring at: |
For the issue detected and documented at
MetaCPAN API - Indexing failed
there are several features needed in the
MetaCPAN::Script::Runner
scriptsSeen in this Test Report
Dependency on MetaCPAN API
GitHub Testing Workflow
the successful test depends on a development in MetaCPAN API.
This change implements several features:
MetaCPAN::Role::Script
:exit_code
cluster_info
indices_info
aliases_info
arg_await_timeout
(triggered with--await
)await()
Methodcheck_health()
MethodThe Developer Documentation is also a bit more extended:
MetaCPAN::Script::Mapping
it implements:arg_cluster_info
(triggered with option--show_cluster_info
)verify_mapping()
Methodwhich depends on data from
deploy_mapping()
and compares it with information gathered inindices_info
andaliases_info
populated through the methodcheck_health()
show_info()
which prints the information gathered by
check_health()
as JSON on the command line.