fix(arke): plug goroutine leaks and propagate TLS config errors in Serve#82
Open
miotte wants to merge 3 commits into
Open
fix(arke): plug goroutine leaks and propagate TLS config errors in Serve#82miotte wants to merge 3 commits into
miotte wants to merge 3 commits into
Conversation
- listener() now surfaces tlsConfig errors instead of silently falling back to cleartext when the operator asked for TLS. - serveErrChan is buffered and the non-OpError branch returns, removing the double-send / blocked-sender goroutine leak on shutdown. - Signal-handler goroutine now exits on context cancel and signal.Notify is stopped, preventing leaks across repeated Serve calls. Signed-off-by: Michael Otteni <MichaelGOtteni@gmail.com>
Adds tests for the previously-uncovered code paths in pkg/arke that were pushing CI coverage to 79.6% (below the 80% threshold): - WithPrometheus interceptor wiring - WithRateLimit: nil, invalid params (zero bucket / refill / max age), and the valid path that installs the limiter and selector interceptors - tlsConfig success path (loads a real keypair, asserts NextProtos) - listener with TLS enabled and listener tlsConfig-error propagation - Serve with the ratelimiter goroutine active - Serve listener-error return path (bad cert path) Local coverage for pkg/arke rises from 75.4% to 92.3%. Signed-off-by: Michael Otteni <MichaelGOtteni@gmail.com>
The std-error-handling exclusion preset in golangci-config already silences errcheck for Close() calls, so the nolint directive was unused and tripped nolintlint. Signed-off-by: Michael Otteni <MichaelGOtteni@gmail.com>
5 tasks
This file contains hidden or 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
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.
Fixes #88