Skip to content

Spring Boot 4 CI matrix never tested against Spring Boot 4 (profile "spring-boot-4" not activated) #2306

@megglos

Description

@megglos

Description

The CI "Spring Boot 4" test matrix jobs have never actually tested against Spring Boot 4. They silently fall back to the default Spring Boot version (currently 3.5.14).

During the 8.8.26 release, the deploy run surfaced the warning:

[WARNING] The requested profile "spring-boot-4" could not be activated because it does not exist.

(seen in run 27198516460 / job 80303227656)

Root cause

The matrix in .github/workflows/build-test.yml declares the Spring Boot versions unquoted:

spring-boot-version: [ 3.5, 4.0]

YAML parses the unquoted 4.0 as a float, and GitHub Actions renders that float as 4 (the trailing-zero fraction is dropped). The Maven invocation:

-P !localBuild,spring-boot-${{ matrix.spring-boot-version }}

therefore expands to -P !localBuild,spring-boot-4, but the Maven profile is named spring-boot-4.0 (spring-test/pom.xml):

<profile>
  <id>spring-boot-4.0</id>
  <properties>
    <dependency.spring-boot.version>4.0.1</dependency.spring-boot.version>
  </properties>
</profile>

Maven can't find spring-boot-4, emits the warning, and the activation is a no-op — so dependency.spring-boot.version stays at the default 3.5.14 and the tests run against Spring Boot 3.5, not 4.

Evidence:

  • The job is named "Run tests on ubuntu-latest and Spring-Boot 4" (note 4, not 4.0) — confirming the matrix value rendered as 4.
  • The logged command shows -P !localBuild,spring-boot-4.
  • Two could not be activated warnings appear in the job log.

The 3.5 entry is unaffected: it is an intentional placeholder for the default version (there is no spring-boot-3.5 profile by design), and a float with a non-zero fraction renders unchanged.

Expected behaviour

The "Spring Boot 4" matrix jobs should activate the spring-boot-4.0 profile and genuinely resolve/test against Spring Boot 4.0.1, with no "could not be activated" warning.

Affected

This was introduced in #2007 (profile + workflow added together). The defect is present on at least:

  • main
  • stable/8.8

Both define the spring-boot-4.0 profile and use the unquoted 4.0 matrix value, so both are affected. Other active stable branches with the same setup should be checked too.

Proposed fix

Quote the matrix values so YAML keeps them as strings:

spring-boot-version: [ '3.5', '4.0' ]

(both occurrences — the unit-test matrix and the testcontainers matrix). This makes ${{ matrix.spring-boot-version }} expand to 4.0, matching the spring-boot-4.0 profile id.

Alternatively, rename the profile to spring-boot-4 to match the coerced value — but quoting the matrix is the more robust fix and keeps the profile id semantically versioned.

Verification

After the fix, the "Spring Boot 4" jobs should:

  • run -P !localBuild,spring-boot-4.0,
  • show no "could not be activated" warning,
  • and resolve spring-boot-dependencies:4.0.1 (verifiable via mvn dependency:tree / the effective Spring Boot version in the build).

Environment

  • Component: zeebe-process-test CI (.github/workflows/build-test.yml) + spring-test/pom.xml
  • Affected versions: main (8.8.27-SNAPSHOT), stable/8.8

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions