Skip to content

Conversation

@easwars
Copy link
Contributor

@easwars easwars commented Nov 14, 2025

Fixes #7686

Current Behavior

  • When client exits IDLE and creates the name resolver, it stays in IDLE until the connectivity state is set by the LB policy.
  • When exiting IDLE mode (because of Connect being called or because of an RPC), if name resolver creation fails, we stay in IDLE.

New Behavior

  • When the client exits IDLE and creates the name resolver, it moves to CONNECTING. Moving forward, the connectivity state will be set by the LB policy.
  • When exiting IDLE mode (because of Connect being called or because of an RPC), we have already moved to CONNECTING (because of the previous bullet point). If name resolver creation fails, we will move to TRANSIENT_FAILURE and start the idle timer and move back to IDLE when the timer fires

RELEASE NOTES:

  • client: Change connectivity state to CONNECTING when creating the name resolver (as part of exiting IDLE).
  • client: Change connectivity state to TRANSIENT_FAILURE if name resolver creation fails.
  • client: Change connectivity state to IDLE after idle timeout expires (also when current state is TRANSIENT_FAILURE).

@easwars easwars requested a review from dfawley November 14, 2025 21:48
@easwars easwars added Type: Bug Area: Client Includes Channel/Subchannel/Streams, Connectivity States, RPC Retries, Dial/Call Options and more. labels Nov 14, 2025
@easwars easwars added this to the 1.78 Release milestone Nov 14, 2025
@easwars easwars requested a review from arjan-bal November 14, 2025 21:48
@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.27%. Comparing base (112ec12) to head (86503d2).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8710      +/-   ##
==========================================
- Coverage   83.28%   83.27%   -0.01%     
==========================================
  Files         416      416              
  Lines       32267    32272       +5     
==========================================
+ Hits        26874    26875       +1     
- Misses       4019     4024       +5     
+ Partials     1374     1373       -1     
Files with missing lines Coverage Δ
clientconn.go 90.50% <100.00%> (+0.36%) ⬆️
internal/idle/idle.go 89.28% <100.00%> (+0.12%) ⬆️
resolver_wrapper.go 92.72% <100.00%> (+0.27%) ⬆️

... and 17 files with indirect coverage changes

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Client Includes Channel/Subchannel/Streams, Connectivity States, RPC Retries, Dial/Call Options and more. Type: Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a test for the initial channel state while waiting for the first name resolver update

3 participants