Skip to content

feat: [DevOps] Add minimal dependencies check (#388) - #1173

Open
SoleilHoffmann wants to merge 3 commits into
mainfrom
minimal-dependencies
Open

SoleilHoffmann wants to merge 3 commits into
mainfrom
minimal-dependencies

Conversation

@SoleilHoffmann

@SoleilHoffmann SoleilHoffmann commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Add a floor-deps Maven profile that pins consumer-facing dependencies to their minimum supported versions, plus a CI step that compiles against them so the SDK cannot accidentally rely on newer-version APIs.

Documents the verified minimum versions in the release notes.

Context

AI/ai-sdk-java-backlog#388.

There is a matching v1 PR
Proof that the check is green with the correct versions
Proof that the check is red with the wrong versions
Slack Thread

Feature scope:

  • floor-deps maven profile
  • CI Check for minimal dependencies

Definition of Done

  • Functionality scope stated & covered
  • Tests cover the scope above
  • Relevant E2E tests are green (at least locally)
  • Error handling created / updated & covered by the tests above
  • Aligned changes with the JavaScript SDK
  • Documentation updated
  • Release notes updated

Add a 'floor-deps' Maven profile that pins consumer-facing dependencies
to their minimum supported versions, plus a CI step that compiles against
them so the SDK cannot accidentally rely on newer-version APIs.

Documents the verified minimum versions in the release notes.

@Jonas-Isr Jonas-Isr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Besides the comment on compile-test I think it looks good!

Comment thread pom.xml Resolved
Comment thread pom.xml
</plugins>
</build>
<profiles>
<profile>

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.

Why did you make a separate profile and GitHub step for this plugin?
Every other plugin is run as part of a local install.
Making it separate means a local install is successful and then the CI fails.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think it's not possible to have two different versions (the minimal floor version and latest) in one profile?
I see the problem that it doesn't fail locally but only in the CI.
I see two options from here:

  1. Add it into the normal lokal install --> it runs every time wich takes even longer for every local install, but would be possible.
  2. keep it like this, and we can run mvn clean test -P floor-deps locally when we need to check this profile.

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.

If you find a way to add it to the local profile it would be great otherwise it’s not technically possible and we accept the compromise

@SoleilHoffmann SoleilHoffmann Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I did some more research and to me it sounds like it's only possible to have one dependency version per profile and per build. It would be possible to do two builds every time, with just one command (the normal maven build command would then create two builds). Same thing would be achieved by running two commands, one with floor-deps and one without.

I could also remove the CI step so we don't have the potential local/github mismatch but then we don't have a guarantee that everyone remembers to run the local floor-deps tests. (I don't like this option)

How often do we expect the test to be red anyways? If it rarely happens I think it would be fine to have that mismatch sometimes, and it's probably an easy fix, you would just have to increase the version in the profile and in the docs, not change the code.

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.

If it only adds 2 seconds to the build then merge it, if it’s way more then leave it out of the local build

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tested it, it was about 25s.

Comment thread pom.xml Resolved
Added Jonas' suggestions
test instead of test-compile, and clean test

Co-authored-by: Jonas-Isr <jonas.israel@sap.com>
…388)

Running the floor check as 'clean test' (not just test-compile) revealed
two floors that compiled but failed at runtime:

- SAP Cloud SDK 5.28.0 calls HttpClient5 5.4+ APIs (TlsSocketStrategy,
  RequestConfig.setProtocolUpgradeEnabled). Raise HttpComponents floor to
  what Cloud SDK 5.28 brings in (httpcore5 5.4.2, httpclient5 5.6).
- Jackson 3 / Spring AI 2.0 (via victools jsonschema-generator 5) needs
  jackson-annotations >= 2.22 (JsonApplyView). jackson-annotations
  versions independently from databind/core, so split it into its own
  floor property (databind/core stays 2.18.0, annotations 2.22).

This branch has not been deployed

No deployments
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