-
-
Notifications
You must be signed in to change notification settings - Fork 259
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
Fix BB-760 : When elasticsearch configuration is missing, server crashes #1081
Conversation
…igs are missing in config.json and also displaying a banner on home page for the same case
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.
Sorry for the long delay!
I have some suggestions to simplify the code a bit and deduplicate some code:
There were some unexpected es lint error not releated to the changes in this PR , but I fixed them too I hope it does no make things confusing for you |
Thanks for the changes, reviewing now. In case it's useful in the future, you can run eslint for specific files instead by passing a file path to the commend: |
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.
Perfect, thanks!
updated configuration options, removing old ones that are not valid anymore
Adding a type to the Elasticsearch client has revealed an issue with our handling of error during bulk indexing, we were using the wrong
Thanks for pointing this out! Hope you don't mind my meddling! |
Problem
BB-760
Solution
As the reason behind the crashing of BB server was the absence of elastic search configuration in our configuration template , I added some checks just before we are initializng the search server in app.js .
Those checks will ensure incase of missing configuration elastic search will still get some hardcoded configuration which will prevent it from crashing on initializing
and also incase of missing configuration error will be logged in console and a warning banner will be displayed on homepage
Areas of Impact