-
Notifications
You must be signed in to change notification settings - Fork 3
PR for v1.5.9 #387
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?
PR for v1.5.9 #387
Changes from all commits
bf938b2
645916d
8b39503
e0fe876
e6b3603
37cc488
8d2a076
1706b3c
36dae89
257260c
18c04d2
608fe03
50fd465
d7558fd
8265843
c97d8da
d846c02
c52fabe
773a4af
21abd0c
1638a72
e4ad286
373e83e
1e3a97c
0861213
8a4e76f
5b784a6
03a08c4
ec6b4ff
ffca7ed
abb0f11
2190478
04db74f
e734f5b
bb92476
372134c
1750f37
7a8bcfd
d91a79f
0e59de8
22c8707
9db5587
4d394ff
e65f6bf
a0ff5a9
12edcea
0540b60
da415cf
ac87b29
c6ab2c7
41e21c7
f58e826
cfd1909
4ca05b0
b3ddf98
fd39cc7
a13b063
6437612
96bd09f
e411795
1cae587
a7f5c61
6a4e36f
1957897
89196a5
7ca3bc6
4ad11a3
dc951f7
50e715d
697f48f
68cb557
9aa7b39
9811abc
a436eee
2b52195
ef5be62
f6bc10b
2ebba8e
0cd70da
6759261
2f7c9b0
81f0362
bd6799b
3e9c39a
0c6984e
e3b1088
d2e0d9f
f41b727
bb12f09
51fd332
dfd5c99
a30ee95
6f44bab
a0b34e1
dd93ee4
e2caf5d
060886f
5ff1abb
3496ea1
6203bc6
afb95f9
9e431da
58ce37a
5155e37
20f271e
161c126
e1523ab
cd23430
cf6be67
32ee8a2
5d77c3d
c733a17
9063afb
d045373
908f8e9
e8a7cd8
040516c
20bbbaf
5603001
84c1a74
c707f5b
75c3a0e
e56012d
b29ba70
c468659
76409ed
7846421
a0dc647
8eab905
eaebd0e
3a4ef93
d615932
0bb5b08
5257d7e
3adecc8
f0d7d18
1e72f1e
8f72329
5642fd2
8a89926
be88f3a
06a8482
a367539
6512e5c
cde5a30
1d88335
122fbd1
178db8d
7bd46ba
08eb2b5
c2c6133
c603794
d071d89
dbb044a
6b49a84
485e833
0763dcc
7999d1b
aebfdef
6449469
b2a2d97
98d4bb6
f5a79c1
85d5972
c5c8b68
cd1161a
ea3522b
1dd9868
eacd37d
f58b0cd
79540e4
9dd682d
f5a4553
9104fd3
6c1e3f3
d6f643f
0d91b85
d5f98fe
7be3c84
9e8416b
645408f
a1f9975
586ff8b
66904b8
5fad522
394e867
1b3c714
ee9f93d
d830808
ea3cf5c
65f039c
0ba0e9e
ab79696
a427e65
d3e41a1
e6475bf
974848a
c319c66
bce0983
66f9cdb
f45bba5
509f988
b00b2d8
03badab
e80c6dc
eeec3fc
99fc3c2
72be0c7
0123717
dcfcc15
f933fb2
71746ac
edc2930
f8e4c0d
5a3f507
0ee195b
714e749
1574b2f
7ec1e02
3d59e66
8c9c4d0
52d3cc7
bffdd2c
dd80caf
edb72d7
899e147
87eae09
4a51080
f35fbd4
e76c8fc
c29989a
0b841af
35f763a
989e2d2
40dfadb
b3a68dd
447d399
f07318b
a4fa7e7
7cb53c4
78d9a54
143ae10
7fbfdcc
23d32c2
88d415e
3b833b1
750bbee
a22f336
89adee1
419bc1c
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 |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| plugins { | ||
| id 'org.springframework.boot' version '3.4.2' | ||
| id 'org.springframework.boot' version '3.5.8' | ||
| id 'io.spring.dependency-management' version '1.1.7' | ||
| id 'io.freefair.lombok' version '8.12' | ||
| id 'io.freefair.maven-publish-java' version '8.12' | ||
| id 'org.owasp.dependencycheck' version '12.0.1' | ||
| id 'org.asciidoctor.jvm.convert' version '4.0.4' | ||
| id 'io.freefair.lombok' version '9.1.0' | ||
| id 'io.freefair.maven-publish-java' version '9.1.0' | ||
| id 'org.owasp.dependencycheck' version '12.1.9' | ||
| id 'org.asciidoctor.jvm.convert' version '4.0.5' | ||
| id 'net.researchgate.release' version '3.1.0' | ||
| id 'com.gorylenko.gradle-git-properties' version '2.4.2' | ||
| id 'com.gorylenko.gradle-git-properties' version '2.5.4' | ||
| id 'java' | ||
| id 'jacoco' | ||
| } | ||
|
|
@@ -22,15 +22,19 @@ repositories { | |
| mavenCentral() | ||
| } | ||
|
|
||
| java { | ||
| sourceCompatibility = JavaVersion.VERSION_17 | ||
| targetCompatibility = JavaVersion.VERSION_17 | ||
| } | ||
|
|
||
| //configurations { | ||
| // all*.exclude module : 'spring-boot-starter-logging' | ||
| //} | ||
|
|
||
| ext { | ||
| set('javersVersion', "7.7.0") | ||
| set('javersVersion', "7.9.0") | ||
| set('springBootVersion', "3.2.1") | ||
| set('springDocVersion', "2.8.4") | ||
| set('springDocVersion', "2.8.14") | ||
| set('keycloakVersion', "19.0.0") | ||
|
|
||
| // directory for generated code snippets during tests | ||
|
|
@@ -41,9 +45,6 @@ println "Running gradle version: $gradle.gradleVersion" | |
| println "Building ${name} version: ${version}" | ||
| println "JDK version: ${JavaVersion.current()}" | ||
|
|
||
| sourceCompatibility = JavaVersion.VERSION_17 | ||
| targetCompatibility = JavaVersion.VERSION_17 | ||
|
|
||
| if (System.getProperty('profile') == 'minimal') { | ||
| println 'Using minimal profile for building ' + project.getName() | ||
| apply from: 'gradle/profile-minimal.gradle' | ||
|
|
@@ -60,29 +61,29 @@ dependencies { | |
| implementation "org.springframework.boot:spring-boot-starter-mail" | ||
| implementation "org.springframework.boot:spring-boot-starter-security" | ||
| implementation "org.springframework.boot:spring-boot-starter-actuator" | ||
| implementation 'org.springframework.data:spring-data-elasticsearch:5.4.2' | ||
| implementation 'org.springframework.data:spring-data-elasticsearch:5.5.6' | ||
|
|
||
| implementation "org.springframework:spring-messaging:6.2.2" | ||
| implementation "org.springframework:spring-messaging:7.0.1" | ||
|
|
||
| // cloud support | ||
| implementation "org.springframework.cloud:spring-cloud-starter-config:4.2.0" | ||
| implementation "org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:4.2.0" | ||
| implementation "org.springframework.cloud:spring-cloud-gateway-mvc:4.2.0" | ||
| implementation 'de.codecentric:spring-boot-admin-starter-client:3.4.1' | ||
| implementation "org.springframework.cloud:spring-cloud-starter-config:4.3.0" | ||
| implementation "org.springframework.cloud:spring-cloud-starter-netflix-eureka-client:4.3.0" | ||
| implementation "org.springframework.cloud:spring-cloud-gateway-mvc:4.3.2" | ||
| implementation 'de.codecentric:spring-boot-admin-starter-client:3.5.6' | ||
|
Comment on lines
+64
to
+72
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. 🧩 Analysis chain🏁 Script executed: # First, locate the build.gradle file
find . -name "build.gradle" -type fRepository: kit-data-manager/base-repo Length of output: 84 🏁 Script executed: # Check file size and read the build.gradle file
wc -l ./build.gradle && echo "---" && cat -n ./build.gradleRepository: kit-data-manager/base-repo Length of output: 6508 🏁 Script executed: # Check if springBootVersion property is used elsewhere in gradle files
grep -r "springBootVersion" . --include="*.gradle" 2>/dev/null
# Also check the referenced gradle profile files
echo "--- Checking profile-minimal.gradle ---"
cat ./gradle/profile-minimal.gradle 2>/dev/null || echo "File not found"
echo "--- Checking profile-complete.gradle ---"
cat ./gradle/profile-complete.gradle 2>/dev/null || echo "File not found"Repository: kit-data-manager/base-repo Length of output: 815 🏁 Script executed: # Search for any usage of springBootVersion variable in code or documentation
rg "springBootVersion" --type gradle --type java 2>/dev/null | grep -v "set('springBootVersion"
# Also check if there are any imports or references in other build files
find . -name "*.gradle" -o -name "*.properties" | xargs grep -l "springBootVersion" 2>/dev/nullRepository: kit-data-manager/base-repo Length of output: 84 Remove the unused The dependency versions (Spring Data Elasticsearch 5.5.6, Spring Messaging 7.0.1, Spring Cloud modules 4.3.x, Spring Boot Admin 3.5.6, repo-core 1.2.6, service-base 1.3.6, nimbus-jose-jwt 10.6, PostgreSQL 42.7.8, H2 2.4.240, spring-restdocs-mockmvc 3.0.5, and Jacoco 0.8.14) align with Spring Boot 3.5.8. However, the |
||
|
|
||
| // springdoc | ||
| implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${springDocVersion}" | ||
| implementation "org.springdoc:springdoc-openapi-starter-common:${springDocVersion}" | ||
| implementation "org.springdoc:springdoc-openapi-starter-webmvc-api:${springDocVersion}" | ||
|
|
||
| implementation "edu.kit.datamanager:repo-core:1.2.5" | ||
| implementation "edu.kit.datamanager:service-base:1.3.3" | ||
| implementation "edu.kit.datamanager:repo-core:1.2.6" | ||
| implementation "edu.kit.datamanager:service-base:1.3.6" | ||
|
|
||
| //implementation "com.github.victools:jsonschema-generator:4.23.0" | ||
|
|
||
| //Keycloak | ||
| // implementation "org.keycloak:keycloak-spring-boot-starter:${keycloakVersion}" | ||
| implementation "com.nimbusds:nimbus-jose-jwt:10.0.1" | ||
| implementation "com.nimbusds:nimbus-jose-jwt:10.6" | ||
| // implementation "io.jsonwebtoken:jjwt-api:0.11.5" | ||
| //implementation "io.jsonwebtoken:jjwt-impl:0.11.5" | ||
| //implementation "io.jsonwebtoken:jjwt-jackson:0.11.5" | ||
|
|
@@ -97,11 +98,11 @@ dependencies { | |
| runtimeOnly "org.apache.httpcomponents:httpclient:4.5.14" | ||
|
|
||
| // driver for postgres | ||
| implementation "org.postgresql:postgresql:42.7.5" | ||
| implementation "org.postgresql:postgresql:42.7.8" | ||
| //driver for h2 | ||
| implementation "com.h2database:h2:2.3.232" | ||
| implementation "com.h2database:h2:2.4.240" | ||
|
|
||
| testImplementation "org.springframework.restdocs:spring-restdocs-mockmvc:3.0.3" | ||
| testImplementation "org.springframework.restdocs:spring-restdocs-mockmvc:3.0.5" | ||
| testImplementation "org.springframework.boot:spring-boot-starter-test" | ||
| testImplementation "org.springframework:spring-test" | ||
| testImplementation "org.springframework.security:spring-security-test" | ||
|
|
@@ -149,7 +150,7 @@ bootJar { | |
| } | ||
|
|
||
| jacoco { | ||
| toolVersion = "0.8.12" | ||
| toolVersion = "0.8.14" | ||
| } | ||
|
|
||
| // task for printing project name. | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| /* | ||
| * Copyright 2025 Karlsruhe Institute of Technology. | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
| package edu.kit.datamanager.repo.test.integration; | ||
|
|
||
| import org.hamcrest.Matchers; | ||
| import org.junit.Before; | ||
| import org.junit.Rule; | ||
| import org.junit.Test; | ||
| import org.junit.runner.RunWith; | ||
| import org.springframework.beans.factory.annotation.Autowired; | ||
| import org.springframework.boot.autoconfigure.domain.EntityScan; | ||
| import org.springframework.boot.test.autoconfigure.actuate.observability.AutoConfigureObservability; | ||
| import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; | ||
| import org.springframework.boot.test.context.SpringBootTest; | ||
| import org.springframework.context.annotation.ComponentScan; | ||
| import org.springframework.data.jpa.repository.config.EnableJpaRepositories; | ||
| import org.springframework.restdocs.JUnitRestDocumentation; | ||
| import org.springframework.security.test.context.support.WithSecurityContextTestExecutionListener; | ||
| import org.springframework.test.annotation.DirtiesContext; | ||
| import org.springframework.test.context.ActiveProfiles; | ||
| import org.springframework.test.context.TestExecutionListeners; | ||
| import org.springframework.test.context.TestPropertySource; | ||
| import org.springframework.test.context.junit4.SpringRunner; | ||
| import org.springframework.test.context.support.DependencyInjectionTestExecutionListener; | ||
| import org.springframework.test.context.support.DirtiesContextTestExecutionListener; | ||
| import org.springframework.test.context.transaction.TransactionalTestExecutionListener; | ||
| import org.springframework.test.context.web.ServletTestExecutionListener; | ||
| import org.springframework.test.web.servlet.MockMvc; | ||
| import org.springframework.test.web.servlet.setup.MockMvcBuilders; | ||
| import org.springframework.web.context.WebApplicationContext; | ||
|
|
||
| import static org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.springSecurity; | ||
| import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; | ||
| import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; | ||
| import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; | ||
| import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; | ||
|
|
||
| /** | ||
| * Test for the Prometheus actuator endpoint. | ||
| * This test checks that the Prometheus endpoint is correctly exposed and that it contains the expected metrics. | ||
| * Also checks that other actuator endpoints are not exposed. | ||
| */ | ||
| @RunWith(SpringRunner.class) | ||
| @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) | ||
| @EntityScan("edu.kit.datamanager") | ||
| @EnableJpaRepositories("edu.kit.datamanager") | ||
| @ComponentScan({"edu.kit.datamanager"}) | ||
| @AutoConfigureMockMvc | ||
|
Comment on lines
+56
to
+61
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. 🧩 Analysis chainJUnit 4 runner in a Spring Boot 3.x stack — confirm Vintage engine presence or plan Jupiter migration You’re using JUnit 4 (SpringRunner, @before, @rule). Ensure the build includes junit-vintage-engine, or migrate tests to JUnit Jupiter to align with modern Spring Test support. Based on learnings. Run to confirm dependencies and usage: 🏁 Script executed: #!/bin/bash
# Find explicit JUnit dependencies and engines
rg -nP -C2 '(junit-?vintage|junit-?jupiter|org\.junit\.jupiter|org\.junit\.vintage|junit[:"]\s*4\.)' \
-g '!**/build/**' -g '!**/out/**'
# Spot JUnit4 annotations in tests
rg -nP -C2 'org\.junit\.(Test|Before|Rule)|@RunWith\(SpringRunner\.class\)' src/testLength of output: 10993 🏁 Script executed: #!/bin/bash
# Search for JUnit dependencies in Maven pom.xml
rg -nP '<artifactId>junit' -C1 -g 'pom.xml'
rg -nP 'org\.junit\.vintage|org\.junit\.jupiter' -g 'pom.xml'
# If Gradle build script present, search for junit dependencies
rg -nP 'junit' -g 'build.gradle' -g 'build.gradle.kts'Length of output: 358 Add JUnit Vintage engine or migrate tests to JUnit Jupiter testRuntimeOnly "org.junit.vintage:junit-vintage-engine"or migrate your tests to JUnit Jupiter. 🤖 Prompt for AI Agents |
||
| @TestExecutionListeners(listeners = {ServletTestExecutionListener.class, | ||
| DependencyInjectionTestExecutionListener.class, | ||
| DirtiesContextTestExecutionListener.class, | ||
| TransactionalTestExecutionListener.class, | ||
| WithSecurityContextTestExecutionListener.class}) | ||
| @ActiveProfiles("test") | ||
| @TestPropertySource(properties = {"spring.datasource.url=jdbc:h2:mem:db_prometheus;DB_CLOSE_DELAY=-1;MODE=LEGACY;NON_KEYWORDS=VALUE"}) | ||
| @TestPropertySource(properties = {"spring.jpa.database-platform=org.hibernate.dialect.H2Dialect"}) | ||
| @TestPropertySource(properties = {"spring.jpa.defer-datasource-initialization=true"}) | ||
| @TestPropertySource(properties = {"repo.monitoring.enabled=true"}) | ||
| @TestPropertySource(properties = {"repo.monitoring.serviceName=base_repo_test"}) | ||
| @TestPropertySource(properties = {"management.endpoints.web.exposure.include=prometheus"}) | ||
| @DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS) | ||
| @AutoConfigureObservability | ||
| public class ActuatorPrometheusTest { | ||
|
|
||
| @Rule | ||
| public JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation(); | ||
| private MockMvc mockMvc; | ||
| @Autowired | ||
| private WebApplicationContext context; | ||
|
|
||
| @Before | ||
| public void setUp() { | ||
|
|
||
| // setup mockMvc | ||
| this.mockMvc = MockMvcBuilders.webAppContextSetup(this.context) | ||
| .apply(springSecurity()) | ||
| .build(); | ||
| } | ||
|
|
||
| @Test | ||
| public void testForNotExposedActuators() throws Exception { | ||
| // Check that all other endpoints are not exposed | ||
| this.mockMvc.perform(get("/actuator/beans")).andDo(print()).andExpect(status().isNotFound()); | ||
| this.mockMvc.perform(get("/actuator/caches")).andDo(print()).andExpect(status().isNotFound()); | ||
| this.mockMvc.perform(get("/actuator/conditions")).andDo(print()).andExpect(status().isNotFound()); | ||
| this.mockMvc.perform(get("/actuator/configprops")).andDo(print()).andExpect(status().isNotFound()); | ||
| this.mockMvc.perform(get("/actuator/env")).andDo(print()).andExpect(status().isNotFound()); | ||
| this.mockMvc.perform(get("/actuator/loggers")).andDo(print()).andExpect(status().isNotFound()); | ||
| this.mockMvc.perform(get("/actuator/heapdump")).andDo(print()).andExpect(status().isNotFound()); | ||
| this.mockMvc.perform(get("/actuator/threaddump")).andDo(print()).andExpect(status().isNotFound()); | ||
| this.mockMvc.perform(get("/actuator/metrics")).andDo(print()).andExpect(status().isNotFound()); | ||
| this.mockMvc.perform(get("/actuator/scheduledtasks")).andDo(print()).andExpect(status().isNotFound()); | ||
| this.mockMvc.perform(get("/actuator/mappings")).andDo(print()).andExpect(status().isNotFound()); | ||
| } | ||
|
|
||
| @Test | ||
| public void testActuator() throws Exception { | ||
| // /actuator/prometheus | ||
| this.mockMvc.perform(get("/actuator/prometheus")).andDo(print()).andExpect(status().isOk()) | ||
| .andExpect(content().string(Matchers.containsString("# TYPE base_repo_test_requests_served_total"))) | ||
| .andExpect(content().string(Matchers.containsString("# TYPE base_repo_test_unique_users"))) | ||
| .andExpect(content().string(Matchers.containsString("# TYPE base_repo_test_registered_users"))) | ||
| .andReturn(); | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
cat -n .github/workflows/docker-publish.yml | head -70Repository: kit-data-manager/base-repo
Length of output: 3360
🏁 Script executed:
Repository: kit-data-manager/base-repo
Length of output: 1339
🏁 Script executed:
Repository: kit-data-manager/base-repo
Length of output: 3110
🏁 Script executed:
Repository: kit-data-manager/base-repo
Length of output: 3435
🏁 Script executed:
Repository: kit-data-manager/base-repo
Length of output: 898
Update Docker action pins to use released versions instead of unreleased commits.
Two of the three Docker action commits do not correspond to any official release:
Line 40 (
docker/login-action@28fdb31ff...): Pinned to an unreleased commit from October 17, 2025, which is after the latest stable release v3.6.0 (September 29, 2025). This commit should be pinned to v3.6.0 or verified as a release candidate.Line 59 (
docker/build-push-action@9e436ba9f2d...): Pinned to an unreleased commit from September 29, 2025. The latest stable release is v6.18.0 (May 27, 2025). This commit is significantly newer than any released version and should be replaced with a stable release tag.Line 52 (
docker/metadata-action@c299e40c...): ✓ Correctly pinned to v5.10.0 (latest stable release as of November 27, 2025).Using unreleased commits bypasses the official release review process and introduces unnecessary risk. Pin to stable release versions (e.g.,
v3.6.0,v6.18.0) instead.🤖 Prompt for AI Agents