Skip to content

Conversation

harshith-2411-2002
Copy link
Contributor

1. Why is this pull request needed and what does it do?

This pull request fixes a logic issue in the forward plugin where an error returned from the proxy package (ErrCachedClosed) was being compared using == against a locally defined error (ErrCachedClosed) in the forward package. Since these were two separate error instances (despite having the same error string), the comparison would always fail.

The change ensures the forward plugin uses the same ErrCachedClosed error instance defined in the proxy package, allowing the == comparison to work as intended. This enables proper detection of closed cached connections and allows for retry behavior, improving connection resilience.

2. Which issues (if any) are related?

No existing GitHub issue is linked to this, but the change addresses subtle error-handling logic that could cause missed retries when upstream connections are closed.

3. Which documentation changes (if any) need to be made?

None. This is an internal logic fix and does not affect the plugin's interface, configuration, or documented behavior.

4. Does this introduce a backward incompatible change or deprecation?

No, the change is backward compatible and does not affect external behavior. It corrects internal error comparison logic without altering the rest.

Signed-off-by: Harshith Prabhakar <harshithprabhakar24@gmail.com>
@harshith-2411-2002 harshith-2411-2002 force-pushed the fix/errcachedclosed-comparison branch from 908def7 to e478a60 Compare July 26, 2025 07:19
Copy link

codecov bot commented Jul 28, 2025

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.77%. Comparing base (93c57b6) to head (e478a60).
⚠️ Report is 1541 commits behind head on master.

Files with missing lines Patch % Lines
plugin/forward/forward.go 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7427      +/-   ##
==========================================
+ Coverage   55.70%   59.77%   +4.07%     
==========================================
  Files         224      273      +49     
  Lines       10016    18037    +8021     
==========================================
+ Hits         5579    10781    +5202     
- Misses       3978     6624    +2646     
- Partials      459      632     +173     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yongtang yongtang merged commit 6ba4392 into coredns:master Jul 28, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants