Skip to content

Conversation

arjan-bal
Copy link
Contributor

Initially, there was no error log when setting the fallback bootstrap config. The GetConfiguration function would first attempt to read the bootstrap configuration from environment variables and then fall back to the configuration provided by the c2p resolver.

A subsequent change, which added an xDS client pool, modified this behavior. It read the bootstrap config within an init() function in clientimpl.go, preventing the c2p resolver from setting its fallback configuration after channel creation. A fix was implemented (#8050) to allow setting a fallback bootstrap config on an xDS client pool, but this introduced an error log when setting the fallback config twice. This happens when multiple c2p resolvers are created in the same process.

After that, #8164 reverted the behavior of reading the bootstrap in the init() function. This allows us to return to the original way—reading from environment variables and then falling back to the c2p resolver's config—without requiring an error log.

RELEASE NOTES:

  • googledirectpath: Avoid error the error log Attempt to set a bootstrap configuration... when creating multiple directpath channels.

@arjan-bal arjan-bal added this to the 1.74 Release milestone Jun 30, 2025
@arjan-bal arjan-bal requested a review from dfawley June 30, 2025 07:37
@arjan-bal arjan-bal added Type: Internal Cleanup Refactors, etc Area: xDS Includes everything xDS related, including LB policies used with xDS. labels Jun 30, 2025
@arjan-bal
Copy link
Contributor Author

FYI @apolcyn

Copy link

codecov bot commented Jun 30, 2025

Codecov Report

Attention: Patch coverage is 85.18519% with 4 lines in your changes missing coverage. Please review.

Project coverage is 82.40%. Comparing base (6207142) to head (2ca8a42).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
xds/internal/xdsclient/pool.go 84.61% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8419      +/-   ##
==========================================
+ Coverage   82.26%   82.40%   +0.14%     
==========================================
  Files         414      414              
  Lines       40424    40426       +2     
==========================================
+ Hits        33255    33314      +59     
+ Misses       5802     5757      -45     
+ Partials     1367     1355      -12     
Files with missing lines Coverage Δ
internal/xds/bootstrap/bootstrap.go 65.91% <100.00%> (+0.56%) ⬆️
xds/internal/xdsclient/pool.go 74.80% <84.61%> (+1.16%) ⬆️

... and 26 files with indirect coverage changes

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

t.Run(name, func(t *testing.T) {
testGetConfigurationWithFileNameEnv(t, name, true, nil)
testGetConfigurationWithFileContentEnv(t, name, true, nil)
})
}
name := "empty"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: const please.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

@arjan-bal arjan-bal merged commit de72c21 into grpc:master Jul 1, 2025
15 checks passed
@arjan-bal arjan-bal deleted the remove-bootstrap-log branch July 1, 2025 21:08
@arjan-bal arjan-bal modified the milestones: 1.74 Release, 1.75 Release Jul 2, 2025
Pranjali-2501 pushed a commit to Pranjali-2501/grpc-go that referenced this pull request Jul 17, 2025
arjan-bal added a commit that referenced this pull request Jul 17, 2025
* xdsclient: preserve original bytes for decoding when the resource is wrapped (#8411)

* xds: Avoid error logs when setting fallback bootstrap config (#8419)

* xdsclient: relay marshalled bytes of complete resource proto to decoders (#8422)

* xds: give up pool lock before closing xdsclient channel (#8445)

* transport: release mutex before returning on expired deadlines in server streams (#8451)

---------

Co-authored-by: Easwar Swaminathan <easwars@google.com>
Co-authored-by: Arjan Singh Bal <46515553+arjan-bal@users.noreply.github.com>
Co-authored-by: Purnesh Dixit <purneshdixit@google.com>
Co-authored-by: Doug Fawley <dfawley@google.com>
@arjan-bal arjan-bal modified the milestones: 1.75 Release, 1.74 Release Aug 1, 2025
dimpavloff pushed a commit to dimpavloff/grpc-go that referenced this pull request Aug 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: xDS Includes everything xDS related, including LB policies used with xDS. Type: Internal Cleanup Refactors, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants