Repository navigation
Conversation
Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 4.1.2 to 4.2.0. - [Release notes](https://github.com/spring-projects/spring-boot/releases) - [Commits](spring-projects/spring-boot@v4.1.2...v4.2.0) --- updated-dependencies: - dependency-name: org.springframework.boot:spring-boot-starter-parent dependency-version: 4.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
The dash-licenses-snapshots plugin repository was declared globally, so Maven queried repo.eclipse.org before Maven Central for every plugin. While repo.eclipse.org answers with 503 and Retry-After, Maven Resolver keeps waiting and retrying, so every CI build stalls for hours. Move the repository into the DashLicense and docker-push profiles, which are the only ones using license-tool-plugin, and limit it to snapshots.
Spring Boot 4.2 manages maven-surefire-plugin 3.6.1, which no longer ships the JUnit 4 providers, so the pinned surefire-junit47 provider cannot be resolved and every build fails. Drop the explicit provider and add junit-vintage-engine as a test dependency so the existing JUnit 4 tests keep running alongside the JUnit Jupiter tests.
Surefire 3.6 (managed by Spring Boot 4.2) only runs tests through the JUnit Platform. Instead of keeping the JUnit 4 tests alive with the deprecated vintage engine, migrate them to JUnit Jupiter. - Convert annotations, assertions, expected exceptions, Parameterized tests and TemporaryFolder to their Jupiter equivalents (OpenRewrite JUnit4to5Migration plus manual fixes) - Drop @RunWith(SpringRunner.class) where @SpringBootTest/@WebMvcTest already register the SpringExtension, use @ExtendWith(SpringExtension.class) elsewhere - Turn the registry TestResourcesLoader rule into a BeforeEachCallback extension registered with @RegisterExtension - Run the TCK test applications through the JUnit Platform Launcher - Replace the AASEnvironmentIT JUnit 4 suite with a JUnit Platform suite - Replace junit/junit-vintage-engine dependencies with junit-jupiter
These JUnit 5 tests never ran before because Surefire was forced onto the JUnit 4 provider. They requested tokens from localhost:9097, which the CI environment does not provide. Use the same token endpoint as the Submodel Repository registry integration tests.
JUnit 4 and JUnit Jupiter differ in how test and lifecycle annotations interact with inheritance, which the automated migration did not cover: - Overriding methods no longer inherit lifecycle annotations: restore @beforeeach on the reset methods that inherited @before and @after - Overrides no longer inherit expected exceptions: assert the client-specific MissingIdentifierException on a shared helper, drop a redundant MongoDB override and turn the unimplemented client invokeNonOperation placeholders into no-ops - Static lifecycle methods no longer hide superclass ones, so both ran and the authorized AAS Environment client tests failed with "port in use": split the base tests into abstract suites with concrete unsecured and authorized subclasses - Test methods run in a different order: authenticate the test thread before each authorized AAS Service test instead of relying on an earlier test having done so
…nt test Same hidden test-order dependency as the authorized AAS Service test: the base suite accesses the secured repository bean directly and only passed under JUnit 4 because an earlier test had set the security context.
Most of the Build and Test BaSyx runtime went into setup that every one of the twelve jobs repeated: - Docker images were built with noCache, so the identical apt-get layer was rebuilt for every image (up to 7 minutes each on slow mirrors). Make noCache configurable via docker.noCache (default stays true for releases) and disable it in the CI workflows through MAVEN_ARGS. - Each job built seven images, but the CI environment only uses four. Build just those, in one Maven invocation. - Start the infrastructure containers (MongoDB, Kafka, Keycloak, Elasticsearch, nginx) before the Maven build so they boot in parallel. - Kibana is not used by any test; move it behind a "kibana" compose profile instead of waiting for it in every job. - Run the BaSyx Common tests only in the BaSyx Core job instead of in all eleven jobs. - Build the reactor with -T 1C and without download progress output.
The automated migration wrote fully qualified @org.junit.jupiter.api.Test annotations in a few classes; import the annotation like everywhere else.
The eclipse-temurin:17 base image already ships ca-certificates (and curl for the health checks). The extra apt-get update downloads the full Ubuntu package index on every build, which took up to 8 minutes per image in CI on slow mirrors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Dependabot's bump of
spring-boot-starter-parentfrom 4.1.2 to 4.2.0 could not be merged: CI hung for hours and the build failed. This PR contains the bump plus everything needed to get it green, a full migration of the test suite from JUnit 4 to JUnit 5, and a reworked CI setup that cuts its runtime by more than half.1. Spring Boot 4.2.0 (Dependabot)
Spring Boot 4.2.0 manages Surefire 3.6.1, which no longer ships JUnit 4 providers. The
surefire-junit47provider pinned in the rootpom.xmlcould no longer be resolved, so every build failed.2. CI no longer hangs on
repo.eclipse.orgThe
dash-licenses-snapshotsplugin repository was declared globally. Maven therefore askedrepo.eclipse.orgbefore Maven Central for every plugin. While that host answered503withRetry-After, every build stalled for hours. The repository is now scoped to theDashLicenseanddocker-pushprofiles, the only places that uselicense-tool-plugin, and limited to snapshots.3. Test suite migrated from JUnit 4 to JUnit 5
JUnit4to5Migrationrecipe: annotations, assertions,expected=toassertThrows,Parameterizedto@ParameterizedTest,TemporaryFolderto@TempDir.junitandjunit-vintage-enginereplaced byjunit-jupiter. The two registrybasetestsmodules keep their tests insrc/main, so they getjunit-jupiterat compile scope.@RunWith(SpringRunner.class)removed. Where@SpringBootTest/@WebMvcTestdon't already register the Spring extension, it is replaced by@ExtendWith(SpringExtension.class).TestResourcesLoaderwas a JUnit 4TestNamerule. It is now aBeforeEachCallbackextension used via@RegisterExtension, with the same API.JUnitCore.AASEnvironmentITis now a JUnit Platform@Suite(junit-platform-suite).JUnit 4 and JUnit 5 treat inheritance and test order differently, and the automated migration does not cover that. These cases were fixed by hand:
@BeforeEachis restored on 7 reset methods that used to inherit@Beforeand@After.expected=.MissingIdentifierExceptionassertions now use a shared helper,updateExistingSubmodelUsingMismatchingId().invokeNonOperationplaceholders are now empty TODO overrides.@BeforeAllno longer hides the parent's, so both ran. The AAS Environment client tests are therefore split into the abstractConnectedAasEnvironmentTestSuiteandConnectedAasManagerTestSuite, with concrete unsecured and authorized subclasses.4. Tests that never ran before now run
The forced JUnit 4 provider silently skipped every JUnit 5 and TestNG test class. They run now:
DiscoveryIntegrationAasRegistryTestTestAASXFileServerHTTP(TestNG)TestAuthorizedSubmodelService,AuthorizedSubmodelServiceFileStreamTest,SubmodelRegistration*Test(4 classes),TestSubmodelServiceHTTPTwo of the newly running tests (
SubmodelRegistrationAuthorizationTestandSubmodelRegistrationUnAuthorizedTest) requested tokens fromlocalhost:9097, which the CI environment does not provide. They now use the same Keycloak endpoint as the Submodel Repository registry tests.5. Faster CI
Most of the "Build and Test BaSyx" runtime was setup that each of its 12 jobs repeated:
apt-getin the Dockerfiles. Every Dockerfile ranapt-get update && apt-get install -y ca-certificates, which downloads the full Ubuntu package index and took up to 8 minutes per build on slow mirrors.eclipse-temurin:17already shipsca-certificates(andcurlfor the health checks), so the step is removed from all 16 Dockerfiles. Checked locally: the image starts, reports healthy and makes HTTPS requests.noCache, so the identicalapt-getlayer was rebuilt for every image, taking up to 7 minutes on slow Ubuntu mirrors.noCacheis now configurable throughdocker.noCache. The default staystrue, so release builds are unchanged. The CI workflows disable it throughMAVEN_ARGS.kibanacompose profile. Locally:docker compose --project-directory ./ci --profile kibana up.-T 1Cand without download progress output.Related Issue
Supersedes #1104, which contained only the
repo.eclipse.orgfix (section 2) and has been closed.BaSyx Configuration for Testing
None. All CI checks pass.
AAS Files Used for Testing
None.
Additional Information
mainmoves, the branch needs a manual rebase. Do not comment@dependabot recreate, as that would discard these commits.basyx.aasregistry/basyx.aasregistry/basyx.aasregistry-service-release-log-mongodb/src/test/java/MongoDbAasTransactionsIT.javais not part of any module. It was migrated for consistency but could be deleted.