Adapt influxdb-spring to Spring Boot 4 actuator package refactoring by ChildrenGreens · Pull Request #850 · influxdata/influxdb-client-java

Conversation

@ChildrenGreens

Description

Spring Boot 4 introduced breaking changes in actuator-related package names
(e.g. org.springframework.boot.actuate.healthorg.springframework.boot.health).

This PR updates influxdb-spring to adapt to the new package structure so it can be used with Spring Boot 4.

Changes

  • Update actuator-related imports for Spring Boot 4 compatibility

Compatibility

  • This change targets Spring Boot 4.x
  • Existing behavior for earlier Spring Boot versions is not affected (if applicable)

Please let me know if you prefer a different compatibility strategy.

@codecov-commenter

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.81%. Comparing base (79b5074) to head (bd61a36).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #850   +/-   ##
=========================================
  Coverage     88.81%   88.81%           
  Complexity      791      791           
=========================================
  Files           174      174           
  Lines          7250     7250           
  Branches        413      413           
=========================================
  Hits           6439     6439           
  Misses          680      680           
  Partials        131      131           

☔ 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.

@Bajoras

bednar

Choose a reason for hiding this comment

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

I prefer to consider this as a breaking change.

Please upgrade major version of the client.

Also update README.md.

@ChildrenGreens

I prefer to consider this as a breaking change.

Please upgrade major version of the client.

Also update README.md.

@bednar Thanks for the feedback!

Since versioning is usually managed by the maintainers during the release process,
I wasn't sure if I should bump the major version in this PR.
Please let me know if you prefer me to update the version here as well.

@bednar

@ChildrenGreens yes, please update current version to 8.0.0-SNAPSHOT in all related places.

Copilot AI review requested due to automatic review settings

March 5, 2026 11:08

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to make the influxdb-spring module compatible with Spring Boot 4’s actuator/health package refactoring by moving health indicator imports to the new org.springframework.boot.health.* packages and adjusting Spring Boot dependencies accordingly. It also bumps the overall project version to 8.0.0-SNAPSHOT and updates multiple README “latest version” snippets to 8.0.0.

Changes:

  • Update Spring Boot health/actuator-related imports in influxdb-spring to Spring Boot 4 package locations.
  • Update influxdb-spring Maven dependencies to align with the new Spring Boot 4 module split (spring-boot-health, etc.).
  • Bump project/module versions to 8.0.0-SNAPSHOT and update various README dependency examples to 8.0.0.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
spring/src/main/java/com/influxdb/spring/health/InfluxDB2HealthIndicator.java Switch health indicator imports to Spring Boot 4 boot.health packages.
spring/src/main/java/com/influxdb/spring/health/InfluxDB2HealthIndicatorAutoConfiguration.java Switch autoconfiguration imports to Spring Boot 4 boot.health packages.
spring/src/test/java/com/influxdb/spring/health/InfluxDB2HealthIndicatorAutoConfigurationTest.java Update test import for the new health autoconfiguration class location.
spring/pom.xml Pin Spring Boot to 4.0.1 and adjust dependencies to the new Boot 4 health/autoconfigure modules.
pom.xml Bump root project version to 8.0.0-SNAPSHOT.
*/pom.xml (multiple modules) Propagate parent version bump to 8.0.0-SNAPSHOT across modules.
README.md + module READMEs Update dependency snippets to 8.0.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 1360 to 1364

<dependency>
<groupId>com.influxdb</groupId>
<artifactId>influxdb-client-java</artifactId>
<version>7.4.0</version>
<version>8.0.0</version>
</dependency>

Choose a reason for hiding this comment

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

This section states that 8.0.0 is the “latest version”. In this repo the current build version is 8.0.0-SNAPSHOT, and the changelog currently doesn’t list an 8.0.0 release, so this may mislead users into trying a non-released version from Maven Central. Consider keeping the latest released version here (or explicitly labeling 8.0.0 as upcoming and pointing users to the snapshot coordinates/repository).

Copilot uses AI. Check for mistakes.

Comment on lines 275 to 279

<dependency>
<groupId>com.influxdb</groupId>
<artifactId>influxdb-client-scala_2.13</artifactId>
<version>7.4.0</version>
<version>8.0.0</version>
</dependency>

Choose a reason for hiding this comment

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

This section states that 8.0.0 is the “latest version”. In this repo the current build version is 8.0.0-SNAPSHOT, and the changelog currently doesn’t list an 8.0.0 release, so this may mislead users into trying a non-released version from Maven Central. Consider keeping the latest released version here (or explicitly labeling 8.0.0 as upcoming and pointing users to the snapshot coordinates/repository).

Copilot uses AI. Check for mistakes.

Comment on lines 303 to 307

<dependency>
<groupId>com.influxdb</groupId>
<artifactId>influxdb-client-kotlin</artifactId>
<version>7.4.0</version>
<version>8.0.0</version>
</dependency>

Choose a reason for hiding this comment

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

This section states that 8.0.0 is the “latest version”. In this repo the current build version is 8.0.0-SNAPSHOT, and the changelog currently doesn’t list an 8.0.0 release, so this may mislead users into trying a non-released version from Maven Central. Consider keeping the latest released version here (or explicitly labeling 8.0.0 as upcoming and pointing users to the snapshot coordinates/repository).

Copilot uses AI. Check for mistakes.

Comment on lines 28 to 31

<groupId>com.influxdb</groupId>
<artifactId>influxdb-client</artifactId>
<version>7.5.0-SNAPSHOT</version>
<version>8.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

Choose a reason for hiding this comment

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

This PR’s stated goal is adapting influxdb-spring for Spring Boot 4 actuator package changes, but the root project version is also bumped to 8.0.0-SNAPSHOT (and propagated across modules). If the version bump is intentional (major release), it should be called out explicitly in the PR description to avoid surprising reviewers and downstream consumers.

Copilot uses AI. Check for mistakes.

Comment on lines 121 to +126

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator-autoconfigure</artifactId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>${spring-boot.version}</version>
<optional>true</optional>
</dependency>

Choose a reason for hiding this comment

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

The dependency swap here (from actuator autoconfigure to core autoconfigure) is a behavior/packaging change beyond just import updates. Please document this in the PR description (and/or migration notes) so consumers know which Spring Boot modules they must have on the classpath for the health indicator autoconfiguration to activate.

Copilot uses AI. Check for mistakes.

Comment on lines 433 to 437

<dependency>
<groupId>com.influxdb</groupId>
<artifactId>influxdb-client-reactive</artifactId>
<version>7.4.0</version>
<version>8.0.0</version>
</dependency>

Choose a reason for hiding this comment

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

This section states that 8.0.0 is the “latest version”. In this repo the current build version is 8.0.0-SNAPSHOT, and the changelog currently doesn’t list an 8.0.0 release, so this may mislead users into trying a non-released version from Maven Central. Consider keeping the latest released version here (or explicitly labeling 8.0.0 as upcoming and pointing users to the snapshot coordinates/repository).

Copilot uses AI. Check for mistakes.

Comment on lines 162 to 166

<dependency>
<groupId>com.influxdb</groupId>
<artifactId>influxdb-client-flux</artifactId>
<version>7.4.0</version>
<version>8.0.0</version>
</dependency>

Choose a reason for hiding this comment

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

This section states that 8.0.0 is the “latest version”. In this repo the current build version is 8.0.0-SNAPSHOT, and the changelog currently doesn’t list an 8.0.0 release, so this may mislead users into trying a non-released version from Maven Central. Consider keeping the latest released version here (or explicitly labeling 8.0.0 as upcoming and pointing users to the snapshot coordinates/repository).

Copilot uses AI. Check for mistakes.

Comment on lines +26 to +28

import org.springframework.boot.health.contributor.AbstractHealthIndicator;
import org.springframework.boot.health.contributor.Health;
import org.springframework.boot.health.contributor.HealthIndicator;

Choose a reason for hiding this comment

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

These imports hard-switch the health indicator to Spring Boot 4’s new org.springframework.boot.health.* packages, which means the module will no longer compile against Spring Boot 3.x (or earlier). This conflicts with the PR description claiming earlier Spring Boot versions are unaffected; either adjust the compatibility strategy (e.g., separate artifacts/profiles for SB3 vs SB4) or update the PR description/release notes to reflect the breaking change.

Copilot uses AI. Check for mistakes.

Comment on lines 73 to 76

<properties>
<micrometer.version>1.15.2</micrometer.version>
<spring-boot.version>3.5.5</spring-boot.version>
<spring-boot.version>4.0.1</spring-boot.version>
<spring.version>6.1.3</spring.version>

Choose a reason for hiding this comment

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

spring-boot.version is bumped to 4.0.1, so this module is now pinned to Spring Boot 4.x and will not build against Spring Boot 3.x without additional compatibility work. This contradicts the PR description’s claim that earlier Spring Boot versions are unaffected; please either implement a dual-compat strategy (profiles/separate artifact) or update the PR description/release notes to reflect the breaking change.

Copilot uses AI. Check for mistakes.

Comment on lines 1097 to 1101

<dependency>
<groupId>com.influxdb</groupId>
<artifactId>flux-dsl</artifactId>
<version>7.4.0</version>
<version>8.0.0</version>
</dependency>

Choose a reason for hiding this comment

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

This section states that 8.0.0 is the “latest version”. In this repo the current build version is 8.0.0-SNAPSHOT, and the changelog currently doesn’t list an 8.0.0 release, so this may mislead users into trying a non-released version from Maven Central. Consider keeping the latest released version here (or explicitly labeling 8.0.0 as upcoming and pointing users to the snapshot coordinates/repository).

Copilot uses AI. Check for mistakes.

bednar

Choose a reason for hiding this comment

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

Please do not change the version in READMEs, only in pom.xml. READMEs will be update after release new version.

@ChildrenGreens

@bednar Thanks for the clarification. README changes have been reverted, and the version is updated only in pom.xml.

bednar

Choose a reason for hiding this comment

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

@ChildrenGreens there is a lot of conficts in PR. Please rebase your sources.

@ChildrenGreens

@bednar Thanks for the notice. I have rebased the branch onto the latest master and resolved the conflicts.

@Bajoras

bednar

Choose a reason for hiding this comment

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

@ChildrenGreens thanks for PR, there is still one small requirement:

@Bajoras

bednar

Choose a reason for hiding this comment

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

LGTM 🪨

bednar

Choose a reason for hiding this comment

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

The last requirement is to add notes to CHANGELOG.md about the changes in 8.0.0. Thanks.

bednar

Choose a reason for hiding this comment

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

LGTM 🚀

@ChildrenGreens