Repository navigation
feat: [DevOps] Add minimal dependencies check (#388) #1173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -114,6 +114,16 @@ | |
| <!-- Binary compatibility check old/new version file --> | ||
| <japicmp.oldVersion.file>/tmp/baseline.jar</japicmp.oldVersion.file> | ||
| <japicmp.newVersion.file>${project.build.directory}/${project.build.finalName}.jar</japicmp.newVersion.file> | ||
| <!-- Minimum supported versions of consumer-facing dependencies, verified by the 'floor-deps' profile --> | ||
| <floor.cloud-sdk.version>5.28.0</floor.cloud-sdk.version> | ||
| <floor.jackson.version>2.18.0</floor.jackson.version> | ||
| <!-- jackson-annotations versions independently from databind/core; Jackson 3 / Spring AI 2.0 needs >= 2.22 (JsonApplyView) --> | ||
| <floor.jackson-annotations.version>2.22</floor.jackson-annotations.version> | ||
| <!-- Coupled to the Cloud SDK floor: SAP Cloud SDK 5.28.0 calls HttpClient5 5.4+ APIs at runtime --> | ||
| <floor.httpcomponents-core5.version>5.4.2</floor.httpcomponents-core5.version> | ||
| <floor.httpcomponents-client5.version>5.6</floor.httpcomponents-client5.version> | ||
| <floor.slf4j.version>2.0.0</floor.slf4j.version> | ||
| <floor.spring-ai.version>2.0.0</floor.spring-ai.version> | ||
| </properties> | ||
|
|
||
| <dependencyManagement> | ||
|
|
@@ -984,6 +994,65 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma | |
| </plugins> | ||
| </build> | ||
| <profiles> | ||
| <profile> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tested it, it was about 25s. |
||
| <!-- Verify the SDK still compiles against the minimum supported dependency versions (floor.* properties). | ||
| Run with: mvn test -P floor-deps --> | ||
| <id>floor-deps</id> | ||
| <dependencyManagement> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>com.sap.cloud.sdk</groupId> | ||
| <artifactId>sdk-bom</artifactId> | ||
| <version>${floor.cloud-sdk.version}</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> | ||
| <!-- optional integration: spring-ai is declared optional in module poms, but still compiled --> | ||
| <dependency> | ||
| <groupId>org.springframework.ai</groupId> | ||
| <artifactId>spring-ai-bom</artifactId> | ||
| <version>${floor.spring-ai.version}</version> | ||
| <type>pom</type> | ||
| <scope>import</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.fasterxml.jackson.core</groupId> | ||
| <artifactId>jackson-databind</artifactId> | ||
| <version>${floor.jackson.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.fasterxml.jackson.core</groupId> | ||
| <artifactId>jackson-core</artifactId> | ||
| <version>${floor.jackson.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.fasterxml.jackson.core</groupId> | ||
| <artifactId>jackson-annotations</artifactId> | ||
| <version>${floor.jackson-annotations.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.httpcomponents.core5</groupId> | ||
| <artifactId>httpcore5</artifactId> | ||
| <version>${floor.httpcomponents-core5.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.httpcomponents.core5</groupId> | ||
| <artifactId>httpcore5-h2</artifactId> | ||
| <version>${floor.httpcomponents-core5.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.httpcomponents.client5</groupId> | ||
| <artifactId>httpclient5</artifactId> | ||
| <version>${floor.httpcomponents-client5.version}</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.slf4j</groupId> | ||
| <artifactId>slf4j-api</artifactId> | ||
| <version>${floor.slf4j.version}</version> | ||
| </dependency> | ||
| </dependencies> | ||
| </dependencyManagement> | ||
| </profile> | ||
| <profile> | ||
| <id>non-release</id> | ||
| <activation> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.