-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[TT-10070] Fix/sanitize error logging #6817
Conversation
💔 The detected issue is not in one of the allowed statuses 💔
Please ensure your jira story is in one of the allowed statuses |
API Changes --- prev.txt 2025-01-09 22:42:56.411418928 +0000
+++ current.txt 2025-01-09 22:42:51.933418463 +0000
@@ -4722,6 +4722,7 @@
Enabled: false,
AllowUnsafe: []string{},
},
+ PIDFileLocation: "/var/run/tyk/tyk-gateway.pid",
}
)
var Global func() Config
@@ -8542,7 +8543,7 @@
RPCListener RPCStorageHandler
DashService DashboardServiceSender
CertificateManager certs.CertificateManager
- GlobalHostChecker HostCheckerManager
+ GlobalHostChecker *HostCheckerManager
ConnectionWatcher *httputil.ConnectionWatcher
HostCheckTicker chan struct{}
HostCheckerClient *http.Client |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
shall we have some sort of constructor/New method to get a new storage so that Connect is always called?
77614a4
to
a00d748
Compare
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, some nit changes left.
leaving an approval.
c1db7da
to
b8dca4e
Compare
Yes, but need to cover it with docs first. It has about 50 coupling points so that would make this large cleanup much larger :) already feels like it could be two. Considering adding a semgrep rule to validate Connect is called as a patch until then. The naming of RedisCluster is also off and we're pushing into storage design pattern issues. |
Quality Gate failedFailed conditions |
User description
https://tyktech.atlassian.net/browse/TT-10070
PR Type
Bug fix, Enhancement
Description
Removed unnecessary PID file reading and improved PID handling.
Enhanced Redis connection handling with explicit connect calls.
Improved webhook validation by checking for empty target paths.
Added test adjustments and cleanup for PID-related functionality.
Changes walkthrough 📝
config.go
Add default PID file location configuration
config/config.go
PIDFileLocation
configuration.server.go
Improve Redis connections and PID handling
gateway/server.go
api_loader.go
Skip mTLS warning when running tests
gateway/api_loader.go
event_handler_webhooks.go
Improve webhook validation and URL checks
gateway/event_handler_webhooks.go
server_test.go
Update tests for PID handling changes
gateway/server_test.go
readPIDFromFile
in tests.