Skip to content

Add Spring Boot xDS integration module boot4-xds - #6891

Open
jrhee17 wants to merge 2 commits into
line:mainfrom
jrhee17:poc/spring-cloud-config
Open

Add Spring Boot xDS integration module boot4-xds#6891
jrhee17 wants to merge 2 commits into
line:mainfrom
jrhee17:poc/spring-cloud-config

Conversation

@jrhee17

@jrhee17 jrhee17 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Motivation:

Users who want to define xDS resources (Listeners, Clusters, etc.) via Spring Environment properties — such as those served by a Spring Cloud Config Server — currently have no built-in integration. They must manually parse bootstrap YAML, create an XdsBootstrap, and wire up property refresh. This PR provides a turnkey Spring Boot auto-configuration that handles all of this.

Modifications:

  • Added spring/boot4-xds module with:
    • SpringXdsAutoConfiguration — auto-creates SpringConfigSourceFactory, XdsBootstrap, and an EnvironmentChangeEvent listener that triggers xDS refresh on property changes
    • SpringConfigSourceFactory — a SotwConfigSourceSubscriptionFactory that reads xDS resources from Spring Environment properties keyed by <prefix>.<resource-name> and pushes updates to subscribers
  • Added armeria.xds.spring.SpringConfigSource protobuf definition in xds-api
  • Added XdsType.resourceClass() to support type-driven proto parsing
  • Added examples/spring-cloud-config-xds example module demonstrating a two-server setup (Config Server + Client) with xDS-resolved WebClient

Result:

  • Users can define xDS resources in application.yml (or via Spring Cloud Config Server) and have them automatically loaded into an XdsBootstrap with zero boilerplate

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 87ebf49d-14ad-46f2-8b80-9ccb179f78c9

📥 Commits

Reviewing files that changed from the base of the PR and between 7149a6a and 24fb597.

📒 Files selected for processing (9)
  • examples/spring-cloud-config-xds/src/main/resources/config-repo/application.yml
  • examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringConfigSourceFactory.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsAutoConfiguration.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsTypeRegistryPackageProvider.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/YamlFilePropertySourceFactory.java
  • spring/boot4-xds/src/main/resources/META-INF/armeria/xds/default-bootstrap.yml
  • spring/boot4-xds/src/test/resources/application-xds-file-test.yml
  • xds-api/src/main/proto/armeria/xds/spring/spring_config_source.proto
🚧 Files skipped from review as they are similar to previous changes (8)
  • xds-api/src/main/proto/armeria/xds/spring/spring_config_source.proto
  • spring/boot4-xds/src/main/resources/META-INF/armeria/xds/default-bootstrap.yml
  • examples/spring-cloud-config-xds/src/main/resources/config-repo/application.yml
  • spring/boot4-xds/src/test/resources/application-xds-file-test.yml
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsTypeRegistryPackageProvider.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringConfigSourceFactory.java
  • examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsAutoConfiguration.java

📝 Walkthrough

Walkthrough

Adds Spring Boot 4 xDS integration backed by Spring Environment properties. It introduces a typed SpringConfigSource, automatic bootstrap configuration, resource refresh handling, integration tests, and a Spring Cloud Config Server/client example.

Changes

Spring xDS configuration integration

Layer / File(s) Summary
xDS configuration contract
xds-api/src/main/proto/..., xds/src/main/java/.../XdsType.java
Adds the SpringConfigSource protobuf message and associates each XdsType with its protobuf resource class.
Spring Boot module registration
dependencies.toml, settings.gradle, spring/boot4-xds/build.gradle, spring/boot4-xds/src/main/java/..., spring/boot4-xds/src/main/resources/...
Registers the module, Spring Cloud dependencies, type registry provider, auto-configuration, and default xDS bootstrap.
Spring Environment resource loading and refresh
spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/*
Loads prefixed YAML properties, converts them to protobuf resources, publishes discovery responses, and refreshes subscriptions after environment changes.
Spring xDS integration validation
spring/boot4-xds/src/test/*
Tests custom bootstrap prefixes, YAML-backed clusters and listeners, snapshot contents, and resolved endpoints.
Spring Cloud Config example
examples/spring-cloud-config-xds/*
Adds a native Config Server, an xDS-backed client, runnable tasks, configuration resources, and an integration test for endpoint updates.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SpringConfigServer
  participant SpringConfigClient
  participant SpringXdsAutoConfiguration
  participant SpringConfigSourceFactory
  participant XdsWebClient
  SpringConfigClient->>SpringConfigServer: import configserver settings
  SpringConfigClient->>SpringXdsAutoConfiguration: create XdsBootstrap
  SpringXdsAutoConfiguration->>SpringConfigSourceFactory: configure Environment-backed source
  SpringConfigSourceFactory->>SpringConfigClient: publish cluster and listener resources
  SpringConfigClient->>XdsWebClient: create xDS-enabled client
  XdsWebClient->>SpringConfigServer: request configured endpoint
Loading

Possibly related PRs

  • line/armeria#6695: Adds the Spring Cloud Config and Context dependency versions used by this change.
  • line/armeria#6833: Provides xDS server/client infrastructure used by the Spring Cloud Config example.
  • line/armeria#6838: Refactors xDS extension and type-registry mechanisms used by the Spring integration.

Suggested reviewers: ikhoon

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.76% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the primary change: adding the Spring Boot xDS integration module.
Description check ✅ Passed The description accurately explains the motivation, major implementation changes, and Spring Cloud Config Server example.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🧹 Nitpick comments (1)
spring/boot4-xds-cloud-config/src/test/java/com/linecorp/armeria/spring/cloud/config/xds/SpringCloudConfigXdsAutoConfigurationTest.java (1)

66-84: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Exercise refresh through EnvironmentChangeEvent.

The factory test only calls factory.refresh() directly. Add an auto-configuration test that updates the property and publishes an EnvironmentChangeEvent; otherwise a broken listener in SpringCloudConfigXdsAutoConfiguration.java:88-92 is not covered.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@spring/boot4-xds-cloud-config/src/test/java/com/linecorp/armeria/spring/cloud/config/xds/SpringCloudConfigXdsAutoConfigurationTest.java`
around lines 66 - 84, Add a test alongside loadClusterViaAutoConfig that changes
the relevant environment property and publishes an EnvironmentChangeEvent
through the application context, then await and assert the XDS configuration
refreshes as expected. Exercise the auto-configuration listener rather than
calling factory.refresh() directly, using the existing xdsBootstrap and cluster
snapshot assertions to verify the updated behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@spring/boot4-xds-cloud-config/src/main/java/com/linecorp/armeria/spring/cloud/config/xds/package-info.java`:
- Around line 1-2: Replace the copyright header in package-info.java with the
repository-required LY copyright header, preserving the remaining package
documentation and file contents unchanged.

In
`@spring/boot4-xds-cloud-config/src/main/java/com/linecorp/armeria/spring/cloud/config/xds/SpringCloudConfigXdsAutoConfiguration.java`:
- Around line 64-66: Add the required `@UnstableApi` annotation to the public
SpringCloudConfigXdsAutoConfiguration class, preserving its existing
`@AutoConfiguration` and `@ConditionalOnClass` annotations.

In
`@spring/boot4-xds-cloud-config/src/main/java/com/linecorp/armeria/spring/cloud/config/xds/SpringConfigSourceFactory.java`:
- Around line 103-111: Add Javadoc to the public interface implementations
name() and create() in SpringConfigSourceFactory, documenting each method’s
purpose, parameters, return value, and any relevant behavior. Keep the
implementation unchanged and follow the project’s existing Javadoc style.
- Around line 160-166: Update the property-key construction in the
resource-loading loop of SpringConfigSourceFactory to include a stable xDS
resource-type segment before the resource name, ensuring different XdsType
values use distinct keys. Apply the same namespaced key contract wherever these
properties are written or read, and add coverage for identical resource names
requested by different types.
- Around line 112-116: Update the prefix initialization in
SpringConfigSourceFactory to use DEFAULT_PREFIX when the unpacked typed config’s
rawPrefix is empty, then apply the existing trailing-dot normalization to that
effective value. Add a test covering an unset protobuf prefix and verify lookups
use the default armeria.xds.test-cluster prefix.
- Line 79: Annotate the new public class SpringConfigSourceFactory with
`@UnstableApi`, adding the appropriate import if needed; the class-level
annotation should cover its public constructor and methods.

---

Nitpick comments:
In
`@spring/boot4-xds-cloud-config/src/test/java/com/linecorp/armeria/spring/cloud/config/xds/SpringCloudConfigXdsAutoConfigurationTest.java`:
- Around line 66-84: Add a test alongside loadClusterViaAutoConfig that changes
the relevant environment property and publishes an EnvironmentChangeEvent
through the application context, then await and assert the XDS configuration
refreshes as expected. Exercise the auto-configuration listener rather than
calling factory.refresh() directly, using the existing xdsBootstrap and cluster
snapshot assertions to verify the updated behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f7d046de-46c2-48bb-ad8e-b575356d1443

📥 Commits

Reviewing files that changed from the base of the PR and between 6f518e7 and ffdbbc3.

📒 Files selected for processing (11)
  • dependencies.toml
  • settings.gradle
  • spring/boot4-xds-cloud-config/build.gradle
  • spring/boot4-xds-cloud-config/src/main/java/com/linecorp/armeria/spring/cloud/config/xds/SpringCloudConfigXdsAutoConfiguration.java
  • spring/boot4-xds-cloud-config/src/main/java/com/linecorp/armeria/spring/cloud/config/xds/SpringConfigSourceFactory.java
  • spring/boot4-xds-cloud-config/src/main/java/com/linecorp/armeria/spring/cloud/config/xds/package-info.java
  • spring/boot4-xds-cloud-config/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  • spring/boot4-xds-cloud-config/src/test/java/com/linecorp/armeria/spring/cloud/config/xds/SpringCloudConfigXdsAutoConfigurationTest.java
  • spring/boot4-xds-cloud-config/src/test/java/com/linecorp/armeria/spring/cloud/config/xds/SpringConfigSourceFactoryTest.java
  • xds-api/src/main/proto/armeria/xds/spring/spring_config_source.proto
  • xds/src/main/java/com/linecorp/armeria/xds/XdsType.java

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.45098% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.15%. Comparing base (8150425) to head (24fb597).
⚠️ Report is 581 commits behind head on main.

Files with missing lines Patch % Lines
.../armeria/spring/xds/SpringConfigSourceFactory.java 76.78% 10 Missing and 3 partials ⚠️
...mework/boot/xds/cloudconfig/client/ClientMain.java 27.27% 8 Missing ⚠️
.../boot/xds/cloudconfig/server/ConfigServerMain.java 66.66% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6891      +/-   ##
============================================
+ Coverage     74.46%   75.15%   +0.69%     
- Complexity    22234    25530    +3296     
============================================
  Files          1963     2274     +311     
  Lines         82437    94653   +12216     
  Branches      10764    12382    +1618     
============================================
+ Hits          61385    71137    +9752     
- Misses        15918    17638    +1720     
- Partials       5134     5878     +744     

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (7)
examples/spring-cloud-config-xds/src/main/resources/config/application-client.yml (1)

1-6: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider enabling fail-fast for the config client.

If the config server is unreachable, the client starts without the armeria.xds.* properties, and the xDS listener stays empty. The failure then appears later as a request error. spring.cloud.config.fail-fast: true makes the startup failure explicit in the example.

♻️ Proposed configuration
 spring:
   config:
     "import": "configserver:"
   cloud:
     config:
       uri: http://localhost:8888
+      fail-fast: true
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@examples/spring-cloud-config-xds/src/main/resources/config/application-client.yml`
around lines 1 - 6, Update the Spring Cloud Config settings in
application-client.yml to enable spring.cloud.config.fail-fast, ensuring startup
fails immediately when the config server is unreachable instead of continuing
without the armeria.xds.* properties.
examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java (2)

32-38: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add coverage for the /relay endpoint.

ClientMain exposes GET /relay, and no test calls it. The test only uses the injected WebClient. Consider @SpringBootTest(webEnvironment = RANDOM_PORT) and one request to /relay so the example endpoint is verified.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java`
around lines 32 - 38, Update SpringCloudConfigXdsExampleTest to run with a
random web environment and add a test using the injected WebClient that sends
one GET request to /relay, verifying the ClientMain endpoint is reachable.

43-57: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Prefer @DynamicPropertySource over a global system property.

startConfigServer mutates the JVM-wide spring.cloud.config.uri property. This works only because the Spring test context loads after @BeforeAll, and it leaks state into any other test class that shares the JVM. @DynamicPropertySource supplies the value directly to the test context and needs no cleanup.

♻️ Proposed refactor
     `@BeforeAll`
     static void startConfigServer() {
         server = ConfigServerMain.createApplication().run("--server.port=0");
-
         configPort = ((WebServerApplicationContext) server).getWebServer().getPort();
-        System.setProperty("spring.cloud.config.uri", "http://localhost:" + configPort);
     }
 
+    `@DynamicPropertySource`
+    static void configServerUri(DynamicPropertyRegistry registry) {
+        registry.add("spring.cloud.config.uri", () -> "http://localhost:" + configPort);
+    }
+
     `@AfterAll`
     static void stopConfigServer() {
-        System.clearProperty("spring.cloud.config.uri");
         if (server != null) {
             server.close();
         }
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java`
around lines 43 - 57, Replace the global spring.cloud.config.uri mutation in
startConfigServer and stopConfigServer with a static `@DynamicPropertySource`
method that registers the URI using the dynamically assigned configPort. Remove
the System.setProperty and System.clearProperty calls while preserving
ConfigServerMain startup and server shutdown.
examples/spring-cloud-config-xds/src/main/resources/config-repo/application.yml (1)

24-35: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Document that the port must match the config server port.

port_value: 8888 must match server.port in examples/spring-cloud-config-xds/src/main/resources/config/application-server.yml. SpringCloudConfigXdsExampleTest replaces this cluster because the test server uses a random port. Add a short comment so a reader knows why the value is duplicated.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@examples/spring-cloud-config-xds/src/main/resources/config-repo/application.yml`
around lines 24 - 35, Add a short YAML comment next to the test-cluster
port_value in the test-cluster configuration explaining that 8888 must match the
server.port setting in application-server.yml, while noting that
SpringCloudConfigXdsExampleTest replaces this cluster because its test server
uses a random port.
examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/XdsClientConfig.java (1)

13-16: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Rename or externalize the hard-coded listener name.

"test-listener" is a literal in main source code, and it must stay in sync with examples/spring-cloud-config-xds/src/main/resources/config-repo/application.yml. The test- prefix also suggests test-only data inside an example application. Bind the name from a property, or use a neutral name such as relay-listener in both files.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/XdsClientConfig.java`
around lines 13 - 16, Update XdsClientConfig.xdsHttpPreprocessor to remove the
hard-coded "test-listener" value: bind the listener name from configuration, or
replace it with a neutral name such as "relay-listener". Ensure the
corresponding listener name in application.yml matches the selected value.
examples/spring-cloud-config-xds/build.gradle (1)

9-17: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add descriptions and grouping to the run tasks.

runConfigServer and runClient have no group or description, so they do not appear meaningfully in ./gradlew tasks. Other example modules in this repository usually set both.

♻️ Proposed task metadata
 tasks.register('runConfigServer', JavaExec) {
+    group = 'Execution'
+    description = 'Runs the Spring Cloud Config Server example.'
     classpath = sourceSets.main.runtimeClasspath
     mainClass = 'example.springframework.boot.xds.cloudconfig.server.ConfigServerMain'
 }
 
 tasks.register('runClient', JavaExec) {
+    group = 'Execution'
+    description = 'Runs the xDS client example.'
     classpath = sourceSets.main.runtimeClasspath
     mainClass = 'example.springframework.boot.xds.cloudconfig.client.ClientMain'
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@examples/spring-cloud-config-xds/build.gradle` around lines 9 - 17, Update
the runConfigServer and runClient task registrations to include the standard
task group and clear descriptions, matching the metadata conventions used by
other example modules so both tasks are meaningfully listed by Gradle.
examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/ClientMain.java (1)

36-51: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Missing Javadoc on the public members of the new example main classes. Both classes document the class but leave their public constructor and public static methods undocumented.

  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/ClientMain.java#L36-L51: add Javadoc for the public constructor, main, and createApplication.
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/server/ConfigServerMain.java#L21-L29: add Javadoc for main and createApplication, and note the activated server and native profiles.

As per path instructions: "provide Javadoc for all public classes and public/protected methods".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/ClientMain.java`
around lines 36 - 51, Document the public constructor, main, and
createApplication methods in ClientMain.java with Javadoc describing their
roles. Also document main and createApplication in ConfigServerMain.java,
explicitly noting that the server and native profiles are activated; cover every
listed public member without changing behavior.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/ClientMain.java`:
- Around line 53-57: Update ClientMain.relay to allow only the intended upstream
path(s) before calling xdsWebClient.get, rejecting any unapproved path with the
existing application error mechanism. Replace the blocking aggregate().join()
flow with a CompletableFuture-based return that maps the completed
AggregatedHttpResponse to the current status-and-body string without blocking
the request thread.

In
`@examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java`:
- Around line 68-81: Update
SpringCloudConfigXdsExampleTest.webClientViaXdsPreprocessor to use Awaitility
when invoking the xDS-resolved health endpoint, retrying until the asynchronous
cluster update is applied and the response status is HttpStatus.OK. Add the
Awaitility test dependency in the example build configuration if it is not
already available, reusing the version-catalog alias.

---

Nitpick comments:
In `@examples/spring-cloud-config-xds/build.gradle`:
- Around line 9-17: Update the runConfigServer and runClient task registrations
to include the standard task group and clear descriptions, matching the metadata
conventions used by other example modules so both tasks are meaningfully listed
by Gradle.

In
`@examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/ClientMain.java`:
- Around line 36-51: Document the public constructor, main, and
createApplication methods in ClientMain.java with Javadoc describing their
roles. Also document main and createApplication in ConfigServerMain.java,
explicitly noting that the server and native profiles are activated; cover every
listed public member without changing behavior.

In
`@examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/XdsClientConfig.java`:
- Around line 13-16: Update XdsClientConfig.xdsHttpPreprocessor to remove the
hard-coded "test-listener" value: bind the listener name from configuration, or
replace it with a neutral name such as "relay-listener". Ensure the
corresponding listener name in application.yml matches the selected value.

In
`@examples/spring-cloud-config-xds/src/main/resources/config-repo/application.yml`:
- Around line 24-35: Add a short YAML comment next to the test-cluster
port_value in the test-cluster configuration explaining that 8888 must match the
server.port setting in application-server.yml, while noting that
SpringCloudConfigXdsExampleTest replaces this cluster because its test server
uses a random port.

In
`@examples/spring-cloud-config-xds/src/main/resources/config/application-client.yml`:
- Around line 1-6: Update the Spring Cloud Config settings in
application-client.yml to enable spring.cloud.config.fail-fast, ensuring startup
fails immediately when the config server is unreachable instead of continuing
without the armeria.xds.* properties.

In
`@examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java`:
- Around line 32-38: Update SpringCloudConfigXdsExampleTest to run with a random
web environment and add a test using the injected WebClient that sends one GET
request to /relay, verifying the ClientMain endpoint is reachable.
- Around line 43-57: Replace the global spring.cloud.config.uri mutation in
startConfigServer and stopConfigServer with a static `@DynamicPropertySource`
method that registers the URI using the dynamically assigned configPort. Remove
the System.setProperty and System.clearProperty calls while preserving
ConfigServerMain startup and server shutdown.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a8d11ac0-fad7-4f8d-b0f0-45a6ccdecf35

📥 Commits

Reviewing files that changed from the base of the PR and between ffdbbc3 and 9f40e89.

📒 Files selected for processing (10)
  • dependencies.toml
  • examples/spring-cloud-config-xds/build.gradle
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/ClientMain.java
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/XdsClientConfig.java
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/server/ConfigServerMain.java
  • examples/spring-cloud-config-xds/src/main/resources/config-repo/application.yml
  • examples/spring-cloud-config-xds/src/main/resources/config/application-client.yml
  • examples/spring-cloud-config-xds/src/main/resources/config/application-server.yml
  • examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java
  • settings.gradle

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsTypeRegistryPackageProvider.java`:
- Around line 23-30: Add `@UnstableApi` to the public
SpringXdsTypeRegistryPackageProvider class unless its package is already marked
unstable. In
spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/YamlPropertySourceFactory.java
at lines 31-40, add `@UnstableApi` and Javadoc to createPropertySource,
documenting the optional name, YAML resource, and returned PropertySource.

In
`@spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/YamlPropertySourceFactory.java`:
- Around line 34-37: Update createPropertySource(...) to validate the
EncodedResource parameter with requireNonNull(resource, "resource") before
calling resource.getResource(), preserving the existing factory setup and
property handling.

In
`@spring/boot4-xds/src/test/resources/application-xds-custom-bootstrap-test.yml`:
- Around line 11-22: Remove the custom-cluster resource under the default
armeria.xds key from the test fixture, leaving only
custom.prefix.custom-cluster; alternatively, change its endpoint and update
assertions to verify the custom-prefixed value is used.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0d08bbf5-2057-4228-8bc3-861f703f61a9

📥 Commits

Reviewing files that changed from the base of the PR and between 9f40e89 and d9899d6.

📒 Files selected for processing (18)
  • examples/spring-cloud-config-xds/build.gradle
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/ClientMain.java
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/server/ConfigServerMain.java
  • settings.gradle
  • spring/boot4-xds/build.gradle
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringConfigSourceFactory.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsAutoConfiguration.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsTypeRegistryPackageProvider.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/YamlPropertySourceFactory.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/package-info.java
  • spring/boot4-xds/src/main/resources/META-INF/armeria/xds/default-bootstrap.yml
  • spring/boot4-xds/src/main/resources/META-INF/services/com.linecorp.armeria.xds.XdsTypeRegistryPackageProvider
  • spring/boot4-xds/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  • spring/boot4-xds/src/test/java/com/linecorp/armeria/spring/xds/SpringXdsCustomBootstrapTest.java
  • spring/boot4-xds/src/test/java/com/linecorp/armeria/spring/xds/SpringXdsYamlFileTest.java
  • spring/boot4-xds/src/test/resources/application-xds-custom-bootstrap-test.yml
  • spring/boot4-xds/src/test/resources/application-xds-file-test.yml
  • xds-api/src/main/proto/armeria/xds/spring/spring_config_source.proto
🚧 Files skipped from review as they are similar to previous changes (4)
  • xds-api/src/main/proto/armeria/xds/spring/spring_config_source.proto
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/server/ConfigServerMain.java
  • examples/spring-cloud-config-xds/build.gradle
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/ClientMain.java

Comment thread spring/boot4-xds/src/test/resources/application-xds-custom-bootstrap-test.yml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringConfigSourceFactory.java`:
- Around line 89-91: Update the public create method to call
Objects.requireNonNull on configSource, factoryContext, and interestedResources
before any dereferencing, using each parameter name as the explicit null-check
message.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2beac055-3e3f-45e1-a34f-72e8a5ecae90

📥 Commits

Reviewing files that changed from the base of the PR and between 5713c00 and 8ee0b9e.

📒 Files selected for processing (5)
  • examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringConfigSourceFactory.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsAutoConfiguration.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsTypeRegistryPackageProvider.java
  • spring/boot4-xds/src/test/resources/application-xds-custom-bootstrap-test.yml
💤 Files with no reviewable changes (1)
  • spring/boot4-xds/src/test/resources/application-xds-custom-bootstrap-test.yml
🚧 Files skipped from review as they are similar to previous changes (3)
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsTypeRegistryPackageProvider.java
  • examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsAutoConfiguration.java

@jrhee17
jrhee17 force-pushed the poc/spring-cloud-config branch from 8ee0b9e to 10244f0 Compare August 4, 2026 07:39
@jrhee17
jrhee17 force-pushed the poc/spring-cloud-config branch from 10244f0 to 7149a6a Compare August 4, 2026 07:41
@jrhee17 jrhee17 added this to the 1.42.0 milestone Aug 4, 2026
@jrhee17 jrhee17 changed the title Add an integration point for xDS with Spring properties Add Spring Boot xDS auto-configuration module spring-boot4-xds Aug 4, 2026
@jrhee17 jrhee17 changed the title Add Spring Boot xDS auto-configuration module spring-boot4-xds Add Spring Boot xDS auto-configuration module spring/boot4-xds Aug 4, 2026
@jrhee17 jrhee17 changed the title Add Spring Boot xDS auto-configuration module spring/boot4-xds Add Spring Boot xDS auto-configuration module boot4-xds Aug 4, 2026
@jrhee17 jrhee17 changed the title Add Spring Boot xDS auto-configuration module boot4-xds Add Spring Boot xDS integration module boot4-xds Aug 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java (1)

58-68: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Narrow and reorder the injected fields.

xdsWebClient, xdsBootstrap, environment, and applicationContext are package-private and appear after the lifecycle methods. Declare them as private and place them with the other fields before startConfigServer.

As per path instructions, use the narrowest possible visibility and organize members top-down.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java`
around lines 58 - 68, Update the injected fields xdsWebClient, xdsBootstrap,
environment, and applicationContext in SpringCloudConfigXdsExampleTest to use
private visibility, and move them before the startConfigServer lifecycle method
alongside the other fields. Preserve their existing injection annotations and
types.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java`:
- Line 1: Add the repository’s standard LY Corporation Apache 2.0 copyright
header at the beginning of SpringCloudConfigXdsExampleTest.java, before the
package declaration; leave the test implementation unchanged.

---

Nitpick comments:
In
`@examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java`:
- Around line 58-68: Update the injected fields xdsWebClient, xdsBootstrap,
environment, and applicationContext in SpringCloudConfigXdsExampleTest to use
private visibility, and move them before the startConfigServer lifecycle method
alongside the other fields. Preserve their existing injection annotations and
types.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b65e04a4-69e0-4d89-9779-cb6c7f820f37

📥 Commits

Reviewing files that changed from the base of the PR and between 8ee0b9e and 10244f0.

📒 Files selected for processing (25)
  • dependencies.toml
  • examples/spring-cloud-config-xds/build.gradle
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/ClientMain.java
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/XdsClientConfig.java
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/server/ConfigServerMain.java
  • examples/spring-cloud-config-xds/src/main/resources/config-repo/application.yml
  • examples/spring-cloud-config-xds/src/main/resources/config/application-client.yml
  • examples/spring-cloud-config-xds/src/main/resources/config/application-server.yml
  • examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java
  • settings.gradle
  • spring/boot4-xds/build.gradle
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringConfigSourceFactory.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsAutoConfiguration.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsTypeRegistryPackageProvider.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/YamlPropertySourceFactory.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/package-info.java
  • spring/boot4-xds/src/main/resources/META-INF/armeria/xds/default-bootstrap.yml
  • spring/boot4-xds/src/main/resources/META-INF/services/com.linecorp.armeria.xds.XdsTypeRegistryPackageProvider
  • spring/boot4-xds/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  • spring/boot4-xds/src/test/java/com/linecorp/armeria/spring/xds/SpringXdsCustomBootstrapTest.java
  • spring/boot4-xds/src/test/java/com/linecorp/armeria/spring/xds/SpringXdsYamlFileTest.java
  • spring/boot4-xds/src/test/resources/application-xds-custom-bootstrap-test.yml
  • spring/boot4-xds/src/test/resources/application-xds-file-test.yml
  • xds-api/src/main/proto/armeria/xds/spring/spring_config_source.proto
  • xds/src/main/java/com/linecorp/armeria/xds/XdsType.java
🚧 Files skipped from review as they are similar to previous changes (23)
  • spring/boot4-xds/src/main/resources/META-INF/services/com.linecorp.armeria.xds.XdsTypeRegistryPackageProvider
  • spring/boot4-xds/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  • xds-api/src/main/proto/armeria/xds/spring/spring_config_source.proto
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsTypeRegistryPackageProvider.java
  • spring/boot4-xds/src/test/resources/application-xds-file-test.yml
  • spring/boot4-xds/src/test/java/com/linecorp/armeria/spring/xds/SpringXdsYamlFileTest.java
  • spring/boot4-xds/src/test/resources/application-xds-custom-bootstrap-test.yml
  • spring/boot4-xds/src/main/resources/META-INF/armeria/xds/default-bootstrap.yml
  • spring/boot4-xds/src/test/java/com/linecorp/armeria/spring/xds/SpringXdsCustomBootstrapTest.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/package-info.java
  • examples/spring-cloud-config-xds/src/main/resources/config/application-client.yml
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/YamlPropertySourceFactory.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsAutoConfiguration.java
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/server/ConfigServerMain.java
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/XdsClientConfig.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringConfigSourceFactory.java
  • examples/spring-cloud-config-xds/build.gradle
  • dependencies.toml
  • examples/spring-cloud-config-xds/src/main/resources/config/application-server.yml
  • settings.gradle
  • examples/spring-cloud-config-xds/src/main/resources/config-repo/application.yml
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/ClientMain.java
  • xds/src/main/java/com/linecorp/armeria/xds/XdsType.java

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java`:
- Around line 47-52: Update startConfigServer() to save the existing
spring.cloud.config.uri system property before replacing it, then update
stopConfigServer() to restore that saved value instead of unconditionally
clearing the property; preserve the property’s absence by clearing it only when
no prior value existed.

In
`@spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/YamlPropertySourceFactory.java`:
- Line 34: Add Javadoc and the `@UnstableApi` annotation to the public override
createPropertySource in YamlPropertySourceFactory, placing both directly on the
method declaration while preserving its existing behavior.
- Around line 38-40: Update the source-name construction in
YamlPropertySourceFactory so an explicit name is used without first calling
resource.getResource().getFilename(); only resolve the filename when name is
null, and fall back to the resource description if that filename is unavailable.
Add a regression test using a filename-less resource with an explicit source
name.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 340ea62c-df9e-43b1-a98f-e710224468c6

📥 Commits

Reviewing files that changed from the base of the PR and between 10244f0 and 7149a6a.

📒 Files selected for processing (25)
  • dependencies.toml
  • examples/spring-cloud-config-xds/build.gradle
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/ClientMain.java
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/XdsClientConfig.java
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/server/ConfigServerMain.java
  • examples/spring-cloud-config-xds/src/main/resources/config-repo/application.yml
  • examples/spring-cloud-config-xds/src/main/resources/config/application-client.yml
  • examples/spring-cloud-config-xds/src/main/resources/config/application-server.yml
  • examples/spring-cloud-config-xds/src/test/java/example/springframework/boot/xds/cloudconfig/SpringCloudConfigXdsExampleTest.java
  • settings.gradle
  • spring/boot4-xds/build.gradle
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringConfigSourceFactory.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsAutoConfiguration.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsTypeRegistryPackageProvider.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/YamlPropertySourceFactory.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/package-info.java
  • spring/boot4-xds/src/main/resources/META-INF/armeria/xds/default-bootstrap.yml
  • spring/boot4-xds/src/main/resources/META-INF/services/com.linecorp.armeria.xds.XdsTypeRegistryPackageProvider
  • spring/boot4-xds/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  • spring/boot4-xds/src/test/java/com/linecorp/armeria/spring/xds/SpringXdsCustomBootstrapTest.java
  • spring/boot4-xds/src/test/java/com/linecorp/armeria/spring/xds/SpringXdsYamlFileTest.java
  • spring/boot4-xds/src/test/resources/application-xds-custom-bootstrap-test.yml
  • spring/boot4-xds/src/test/resources/application-xds-file-test.yml
  • xds-api/src/main/proto/armeria/xds/spring/spring_config_source.proto
  • xds/src/main/java/com/linecorp/armeria/xds/XdsType.java
🚧 Files skipped from review as they are similar to previous changes (23)
  • spring/boot4-xds/src/test/java/com/linecorp/armeria/spring/xds/SpringXdsYamlFileTest.java
  • examples/spring-cloud-config-xds/src/main/resources/config/application-client.yml
  • examples/spring-cloud-config-xds/build.gradle
  • examples/spring-cloud-config-xds/src/main/resources/config/application-server.yml
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/package-info.java
  • spring/boot4-xds/src/test/resources/application-xds-custom-bootstrap-test.yml
  • spring/boot4-xds/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
  • spring/boot4-xds/src/main/resources/META-INF/armeria/xds/default-bootstrap.yml
  • settings.gradle
  • spring/boot4-xds/src/main/resources/META-INF/services/com.linecorp.armeria.xds.XdsTypeRegistryPackageProvider
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsTypeRegistryPackageProvider.java
  • spring/boot4-xds/src/test/resources/application-xds-file-test.yml
  • spring/boot4-xds/build.gradle
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/XdsClientConfig.java
  • xds-api/src/main/proto/armeria/xds/spring/spring_config_source.proto
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringXdsAutoConfiguration.java
  • spring/boot4-xds/src/test/java/com/linecorp/armeria/spring/xds/SpringXdsCustomBootstrapTest.java
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/client/ClientMain.java
  • dependencies.toml
  • examples/spring-cloud-config-xds/src/main/resources/config-repo/application.yml
  • xds/src/main/java/com/linecorp/armeria/xds/XdsType.java
  • spring/boot4-xds/src/main/java/com/linecorp/armeria/spring/xds/SpringConfigSourceFactory.java
  • examples/spring-cloud-config-xds/src/main/java/example/springframework/boot/xds/cloudconfig/server/ConfigServerMain.java

@jrhee17
jrhee17 marked this pull request as ready for review August 4, 2026 09:13
@jrhee17
jrhee17 requested review from ikhoon and minwoox as code owners August 4, 2026 09:13
@mergify

mergify Bot commented Aug 4, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@minwoox minwoox left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 👍 👍


@Override
public Iterable<String> packages() {
return List.of("com.linecorp.armeria.spring.xds");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ImmutableList?

final YamlPropertiesFactoryBean factory = new YamlPropertiesFactoryBean();
factory.setResources(resource.getResource());
final Properties properties = requireNonNull(factory.getObject(), "properties");
final String filename = requireNonNull(resource.getResource().getFilename(), "filename");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can retrieve filename only when the name is null?

* updated resources to subscribers.
*/
public void refresh() {
refreshSignal.push();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this okay for calling push from another thread?

final SpringConfigSource springConfigSource =
factoryContext.validator().unpack(configSource.getCustomConfigSource().getTypedConfig(),
SpringConfigSource.class);
final String rawPrefix = springConfigSource.getPrefix();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: better to call trim?


package armeria.xds.spring;

option java_package = "com.linecorp.armeria.spring.xds";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

xds.spring like we did for Athenz?

@ikhoon ikhoon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks useful!

xds:
listener:
test-listener: |
name: test-listener

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Question) Could we use nested YAML syntax here instead?

for (InterestedResources interested : interests.values()) {
try {
final DiscoveryResponse response = buildResponse(environment, prefix, interested);
watcher.onUpdate(response, null);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I understand that dedup is already handled by ResourceStateStore.

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.

3 participants