-
Notifications
You must be signed in to change notification settings - Fork 0
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 /health/info
Redis connection
#411
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://eaflood.atlassian.net/browse/WATER-4099 After adding the missing information to the `/health/info` page in PR #376 It was discovered that whilst it worked fine locally, when viewed on the `dev` server Redis was unable to connect. This was down the Redis connection on the AWS servers needing TLS to be enabled. This PR will enable TLS by default for the Redis connection & add an environment variable to enable TLS to be disabled locally. Whilst debugging this issue it was also found that if a connection to Redis could not be established the page would error rather than just display a connection failure message for Redis and continue to show the status of the other services. This behaviour was not present locally. After much hacking a fix has not be found for this issue. Given we have more urgent work currently this issue will be added to our issues backlog to investigate further at a later date.
Found this post <https://stackoverflow.com/a/61133867> which put me onto some additional properties we can pass in the config that make the client throw an error as expected when a command fails to complete rather than using the under-the-hood Redis error handling. This means should we fail to connect an error will be thrown which we can trap and display in our health info page.
Cruikshanks
approved these changes
Sep 7, 2023
PR linked to this issue DEFRA/water-abstraction-team#54 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://eaflood.atlassian.net/browse/WATER-4099
After adding the missing information to the
/health/info
page in PR #376 It was discovered that whilst it worked fine locally, when viewed on thedev
server Redis was unable to connect. This was down the Redis connection on the AWS servers needing TLS to be enabled.This PR will enable TLS by default for the Redis connection & add an environment variable to enable TLS to be disabled locally.