Skip to content

Conversation

@jrhee17
Copy link
Contributor

@jrhee17 jrhee17 commented Nov 11, 2025

Motivation:

While SnapshotWatchers provide a way for users to opt into logging errors, this is not enabled by default.
Additionally, there is no way to notify users that secondary bootstrap resources have not been loaded correctly.
For this reason, I propose that a default SnapshotWatcher be added to a XdsBootstrap where the default watcher logs on errors. This watcher is added to AbstractRoot and bootstrap constructs by default.

In order to ensure parsing failures are propagated, AbstractResourceNode#doOnChanged now also propagates errors to the parent on exception.

Note that transient errors (network errors while fetching resources) are not logged at this level.

Modifications:

  • A xDS-dedicated EventExecutor is used for the default event loop.
  • XdsBootstrapBuilder is introduced, and users are able to set the default SnapshotWatcher
  • The default SnapshotWatcher is added to all bootstrap constructs/AbstractRoot implementations
  • If AbstractResourceNode#doOnChanged throws an exception, the error is propagated to the parent node

Result:

  • Parsing/configuration errors are propagated to the user-specified SnapshotWatcher
  • When an error occurs, a warning log is logged by default

@jrhee17 jrhee17 added this to the 1.34.0 milestone Nov 11, 2025
@jrhee17 jrhee17 marked this pull request as ready for review November 12, 2025 00:32
Copy link
Contributor

@ikhoon ikhoon left a comment

Choose a reason for hiding this comment

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

👍👍

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants