Skip to content

Commit e562ba1

Browse files
authored
Dependency and build updates (#1586)
* use a postgresql 16.2 in development that is compatible with the current deployment * disable data repository scans for unused things that just add a lot of logging * update spring boot, hibernate, flyway, commons-lang, provide more sane config for development * remove unused imports * add clarifying comment why auto configuration is excluded * update spring dependency management plugin
1 parent 0e3ac34 commit e562ba1

4 files changed

Lines changed: 30 additions & 19 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22

33
postgres:
4-
image: postgres:latest
4+
image: postgres:16.2
55
environment:
66
- POSTGRES_USER=openvsx
77
- POSTGRES_PASSWORD=openvsx

server/build.gradle

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ buildscript {
33
mavenCentral()
44
}
55
dependencies {
6-
classpath "org.hibernate.orm:hibernate-gradle-plugin:6.2.2.Final"
6+
classpath "org.hibernate.orm:hibernate-gradle-plugin:6.6.39.Final"
77
classpath "com.adarshr.test-logger:com.adarshr.test-logger.gradle.plugin:4.0.0"
88
}
99
}
@@ -13,8 +13,8 @@ plugins {
1313
id 'jacoco'
1414
id 'org.jooq.jooq-codegen-gradle' version '3.19.26'
1515
id 'de.undercouch.download' version '5.4.0'
16-
id 'org.springframework.boot' version '3.5.6'
17-
id 'io.spring.dependency-management' version '1.1.0'
16+
id 'org.springframework.boot' version '3.5.10'
17+
id 'io.spring.dependency-management' version '1.1.7'
1818
id 'io.gatling.gradle' version '3.14.9'
1919
id 'maven-publish'
2020
}
@@ -24,7 +24,7 @@ apply plugin: 'com.adarshr.test-logger'
2424
def jooqSrcDir = 'src/main/jooq-gen'
2525
def versions = [
2626
java: '25',
27-
flyway: '9.19.1',
27+
flyway: '11.20.3',
2828
springdoc: '2.8.13',
2929
gcloud: '2.50.0',
3030
azure: '12.23.0',
@@ -33,12 +33,12 @@ def versions = [
3333
testcontainers: '1.19.3',
3434
jackson: '2.15.2',
3535
woodstox: '6.4.0',
36-
jobrunr: '7.5.0',
36+
jobrunr: '7.5.3',
3737
bucket4j: '0.12.7',
3838
bucket4j_redis: '8.10.1',
3939
tika: '3.2.2',
4040
bouncycastle: '1.80',
41-
commons_lang3: '3.12.0',
41+
commons_lang3: '3.20.0',
4242
jaxb_api: '2.3.1',
4343
jaxb_impl: '2.3.8',
4444
gatling: '3.14.9',
@@ -119,6 +119,7 @@ dependencies {
119119
implementation "com.bucket4j:bucket4j-redis:${versions.bucket4j_redis}"
120120
implementation "org.jobrunr:jobrunr-spring-boot-3-starter:${versions.jobrunr}"
121121
implementation "org.flywaydb:flyway-core:${versions.flyway}"
122+
implementation "org.flywaydb:flyway-database-postgresql:${versions.flyway}"
122123
implementation "com.google.cloud:google-cloud-storage:${versions.gcloud}"
123124
implementation "com.azure:azure-storage-blob:${versions.azure}"
124125
implementation "software.amazon.awssdk:s3:${versions.aws}"
@@ -201,8 +202,8 @@ publishing {
201202
}
202203
}
203204

204-
task runServer(type: JavaExec) {
205-
// jvmArgs = ['-Xverify:none']
205+
tasks.register('runServer', JavaExec) {
206+
jvmArgs = ['--enable-native-access=ALL-UNNAMED'] // due to https://github.com/netty/netty/issues/15161
206207
classpath = sourceSets.dev.runtimeClasspath
207208
mainClass = 'org.eclipse.openvsx.RegistryApplication'
208209
}
@@ -211,7 +212,7 @@ test {
211212
useJUnitPlatform()
212213
}
213214

214-
task unitTests(type: Test) {
215+
tasks.register('unitTests', Test) {
215216
description = 'Runs unit tests (excluding integration tests).'
216217
group = 'verification'
217218
testClassesDirs = sourceSets.test.output.classesDirs
@@ -223,7 +224,7 @@ task unitTests(type: Test) {
223224
exclude 'org/eclipse/openvsx/storage/AwsStorageServiceIntegrationTest.class'
224225
}
225226

226-
task s3IntegrationTests(type: Test) {
227+
tasks.register('s3IntegrationTests', Test) {
227228
description = 'Runs S3 integration tests using LocalStack (requires Docker/Podman).'
228229
group = 'verification'
229230
testClassesDirs = sourceSets.test.output.classesDirs

server/src/dev/resources/application.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
logging:
22
pattern:
3-
level: '%5p [${spring.application.name:},%X{traceId:-},%X{spanId:-}]'
3+
level: '%5p'
4+
console: '%d{yyyy-MM-dd HH:mm:ss} | %-5level | %logger{5} | %msg%n'
5+
level:
6+
root: "info"
47

58
server:
69
port: 8080
@@ -33,9 +36,6 @@ spring:
3336
baseline-description: JobRunr tables
3437
jpa:
3538
open-in-view: false
36-
properties:
37-
hibernate:
38-
dialect: org.hibernate.dialect.PostgreSQLDialect
3939
hibernate:
4040
ddl-auto: none
4141
session:
@@ -157,11 +157,11 @@ ovsx:
157157
publisher-agreement:
158158
timezone: US/Eastern
159159
extension-control:
160-
update-on-start: true
160+
update-on-start: false
161161
integrity:
162162
key-pair: create # create, renew, delete, 'undefined'
163163
registry:
164-
version: 'v0.14.3'
164+
version: 'v0.32.0-dev'
165165
storage:
166166
local:
167167
directory: /tmp

server/src/main/java/org/eclipse/openvsx/RegistryApplication.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
import org.springframework.boot.SpringApplication;
1919
import org.springframework.boot.autoconfigure.SpringBootApplication;
2020
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
21+
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchRepositoriesAutoConfiguration;
22+
import org.springframework.boot.autoconfigure.data.elasticsearch.ReactiveElasticsearchRepositoriesAutoConfiguration;
23+
import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration;
2124
import org.springframework.boot.context.properties.EnableConfigurationProperties;
2225
import org.springframework.boot.web.servlet.FilterRegistrationBean;
23-
import org.springframework.cache.annotation.EnableCaching;
2426
import org.springframework.context.annotation.Bean;
2527
import org.springframework.core.Ordered;
2628
import org.springframework.retry.annotation.EnableRetry;
@@ -31,7 +33,15 @@
3133
import org.springframework.security.web.firewall.HttpStatusRequestRejectedHandler;
3234
import org.springframework.security.web.firewall.RequestRejectedHandler;
3335

34-
@SpringBootApplication
36+
@SpringBootApplication(exclude = {
37+
// currently no redis / elasticsearch repositories are being used
38+
// exclude autoconfiguration for them to avoid unnecessary logging
39+
// messages due to existing jpa repositories
40+
// can be removed once such repositories are in use
41+
ElasticsearchRepositoriesAutoConfiguration.class,
42+
ReactiveElasticsearchRepositoriesAutoConfiguration.class,
43+
RedisRepositoriesAutoConfiguration.class,
44+
})
3545
@EnableScheduling
3646
@EnableRetry
3747
@EnableAsync

0 commit comments

Comments
 (0)