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
Enhance Logging for Redis Connection Failures and Add API Endpoint for Gateway Settings #5391
base: master
Are you sure you want to change the base?
Conversation
PR Analysis
PR Feedback
How to use
|
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
GitHub actions yielded the following error. The relevant lines from the logs are:
The command that failed is:
There are a lot of errors. This is likely a larger issue with the PR and not a small linting/type-checking issue. This is likely a linting or type-checking issue with the source code. |
API tests result: failure 🚫 |
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
GitHub actions yielded the following error. The relevant lines from the logs corresponding to the error are:
The command that failed is There are a lot of errors. This is likely a larger issue with the PR and not a small linting/type-checking issue. This is likely a linting or type-checking issue with the source code. |
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
API tests result: failure 🚫 |
API tests result: failure 🚫 |
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
GitHub actions yielded the following error. The relevant lines from the logs corresponding to the error are:
The command that failed is There are a lot of errors. This is likely a larger issue with the PR and not a small linting/type-checking issue. This is likely a linting or type-checking issue with the source code. |
API tests result: failure 🚫 |
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
GitHub actions yielded the following error. The relevant lines from the logs corresponding to the error are:
The command that failed is There are a lot of errors. This is likely a larger issue with the PR and not a small linting/type-checking issue. This is likely a linting or type-checking issue with the source code. |
API tests result: failure 🚫 |
API tests result: failure 🚫 |
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
GitHub actions yielded the following error. The relevant lines from the logs corresponding to the error are:
The command that failed is There are a lot of errors. This is likely a larger issue with the PR and not a small linting/type-checking issue. This is likely a linting or type-checking issue with the source code. |
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
API tests result: failure 🚫 |
API tests result: failure 🚫 |
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
Terraform Format and Style 🖌``Terraform Initialization ⚙️
|
API tests result: failure 🚫 |
API tests result: failure 🚫 |
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
Terraform Format and Style 🖌``Terraform Initialization ⚙️
|
API tests result: failure 🚫 |
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
Terraform Format and Style 🖌``Terraform Initialization ⚙️
|
API tests result: failure 🚫 |
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
Terraform Format and Style 🖌``Terraform Initialization ⚙️
|
API tests result: failure 🚫 |
💥 CI tests failed 🙈git-stateall ok Please look at the run or in the Checks tab. |
Terraform Format and Style 🖌``Terraform Initialization ⚙️
|
API tests result: failure 🚫 |
Description
This PR enhances the logging mechanism in Tyk when it fails to establish a connection with Redis. The current error message is generic and does not provide sufficient information to diagnose the issue effectively. This PR modifies the error handling code in the Redis connection module to capture and log more detailed information about the nature of the connection failure. The enhanced error message now includes the host Tyk is attempting to connect to, whether the hostname failed to resolve, if the TCP request timed out, if Redis prompted for a password, if Redis responded with
WRONGPASS
, and if SSL failed. This will greatly improve the user experience and reduce the time spent on debugging connection issues.Additionally, this PR adds a new API endpoint that behaves similar to the
env
command in Unix. This endpoint allows users to retrieve the settings loaded by the gateway, making it easier to identify any configuration discrepancies. The new API endpoint is implemented by adding a new route and corresponding handler function in the API module.Summary of Changes
Please review and merge this PR at your earliest convenience. If you have any questions or need further clarification, please let me know.
Fixes #5320.
To checkout this PR branch, run the following command in your terminal:
To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.