Skip to content

Commit c2cd73d

Browse files
committed
Merge branch 'master' into RMB-1030
# Conflicts: # domain-models-runtime/src/test/java/org/folio/rest/persist/cache/CachedConnectionManagerTest.java
2 parents 3e95e07 + 53c01dd commit c2cd73d

73 files changed

Lines changed: 1470 additions & 1197 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## 35.4.0 2025-02-28
22

3-
Sunflower (2025 R1) release.
3+
Sunflower (2025 R1) release, see [upgrade notes](doc/upgrading.md#version-354).
44

55
* [RMB-1010](https://folio-org.atlassian.net/browse/RMB-1010): PostgreSQLContainer withStartupAttempts(3)
66
* [RMB-1011](https://folio-org.atlassian.net/browse/RMB-1011): Timeout when trying to connect to DB\_HOST:DB\_PORT

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,15 @@ we will get your local development server running and populated with test data.
320320

321321
## Command-line options
322322

323+
Use the `-D` option before the `-jar` argument to pass options as system properties.
324+
323325
- `-Dhttp.port=8080` Optional -- defaults to 8081
324326

325327
- `-Ddebug_log_package=*` Optional -- Set log level to debug for all packages.
326328
Or use `org.folio.rest.*` for all classes within a specific package,
327329
or `org.folio.rest.RestVerticle` for a specific class.
328330

329-
- `db_connection=[path]` Optional -- path to a JSON config file with
331+
- `-Ddb_connection=[path]` Optional -- path to a JSON config file with
330332
connection parameters to a PostgreSQL DB
331333

332334
- for example Postgres: `{"host":"localhost", "port":5432, "maxPoolSize":50,
@@ -339,14 +341,6 @@ or `org.folio.rest.RestVerticle` for a specific class.
339341

340342
- if file not found or path is relative tries to read a class path resource with that path
341343

342-
- Other module-specific arguments can be passed via the command line in the format key=value. These will be accessible to implementing modules via `RestVerticle.MODULE_SPECIFIC_ARGS` map.
343-
344-
- Optional JVM arguments can be passed before the `-jar` argument, e.g.
345-
`-XX:+HeapDumpOnOutOfMemoryError`
346-
`-XX:+PrintGCDetails`
347-
`-XX:+PrintGCTimeStamps`
348-
`-Xloggc:C:\Git\circulation\gc.log`
349-
350344
## Environment Variables
351345

352346
RMB implementing modules expect a set of environment variables to be passed in at module startup. The environment variables expected by RMB modules are:
@@ -385,7 +379,7 @@ Use `DB_SERVER_PEM` (or `server_pem` in the JSON config) to set SSL/TLS certific
385379

386380
The environment variable `DB_CONNECTIONRELEASEDELAY` sets the delay in milliseconds after which an idle connection is closed. A connection becomes idle if the query ends, it is not idle if it is waiting for a response. Use 0 to keep idle connections open forever. RMB's default is one minute (60000 ms).
387381

388-
`DB_MAX_LIFETIME` limits the lifetime (non-idle time plus idle time) of a database connection in milliseconds. If exceeded the connection is closed if it is or becomes idle. 0 means unlimited lifetime. It defaults to 30000. This options exists since RMB 36.0.0 (Trillium).
382+
`DB_MAX_LIFETIME` limits the lifetime (non-idle time plus idle time) of a database connection in milliseconds. If exceeded the connection is closed if it is or becomes idle. 0 means unlimited lifetime. It defaults to 1800000 (30 minutes). This options exists since RMB 36.0.0 (Trillium).
389383

390384
`DB_RECONNECTATTEMPTS` and `DB_RECONNECTINTERVAL` set the maximum number of retries after a connect to the database fails, and how many milliseconds to wait before the next reconnect. Reconnecting is disabled by default.
391385

cql2pgjson-cli/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>org.folio</groupId>
88
<artifactId>raml-module-builder</artifactId>
9-
<version>35.5.0-SNAPSHOT</version>
9+
<version>36.0.0-SNAPSHOT</version>
1010
</parent>
1111

1212
<properties>

cql2pgjson/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.folio</groupId>
99
<artifactId>raml-module-builder</artifactId>
10-
<version>35.5.0-SNAPSHOT</version>
10+
<version>36.0.0-SNAPSHOT</version>
1111
</parent>
1212

1313
<licenses>
@@ -130,13 +130,13 @@
130130

131131
<dependency>
132132
<groupId>org.testcontainers</groupId>
133-
<artifactId>junit-jupiter</artifactId>
133+
<artifactId>testcontainers-junit-jupiter</artifactId>
134134
<scope>test</scope>
135135
</dependency>
136136

137137
<dependency>
138138
<groupId>org.testcontainers</groupId>
139-
<artifactId>postgresql</artifactId>
139+
<artifactId>testcontainers-postgresql</artifactId>
140140
<scope>test</scope>
141141
</dependency>
142142

cql2pgjson/src/main/java/org/folio/cql2pgjson/CQL2PgJSON.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ private void loadDbSchema(String schemaPath) {
181181
private static Schema loadDbSchemaFromResource(String schemaPath) {
182182
try {
183183
String dbJson = ResourceUtil.asString(schemaPath, CQL2PgJSON.class);
184-
logger.info("loadDbSchema: Loaded {} OK", schemaPath);
184+
logger.debug("loadDbSchema: Loaded {} OK", schemaPath);
185185
return ObjectMapperTool.getMapper().readValue(dbJson, Schema.class);
186186
} catch (IOException e) {
187187
throw new UncheckedIOException(e);
@@ -923,7 +923,7 @@ String queryByFt(String indexText, String term, String comparator, Index schemaI
923923
}
924924
String sql = "get_tsvector(" + indexText + ") " + "@@ " + tsTerm.toString();
925925

926-
logger.info("full text index {} generated SQL {}", indexText, sql);
926+
logger.debug("full text index {} generated SQL {}", indexText, sql);
927927
return sql;
928928
}
929929

@@ -981,7 +981,7 @@ private String queryByLike(String index, DbIndex dbIndex, IndexTextAndJsonValues
981981
}
982982
}
983983

984-
logger.info("index {} generated SQL {}", indexText, sql);
984+
logger.debug("index {} generated SQL {}", indexText, sql);
985985
return sql;
986986
}
987987

@@ -1016,7 +1016,7 @@ private String queryBySql(DbIndex dbIndex, IndexTextAndJsonValues vals, CQLTermN
10161016
logger.warn("Doing SQL query without index for {}", s);
10171017
}
10181018

1019-
logger.info("index {} generated SQL {}", indexMod, sql);
1019+
logger.debug("index {} generated SQL {}", indexMod, sql);
10201020
return sql;
10211021
}
10221022

dbschema/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<parent>
88
<groupId>org.folio</groupId>
99
<artifactId>raml-module-builder</artifactId>
10-
<version>35.5.0-SNAPSHOT</version>
10+
<version>36.0.0-SNAPSHOT</version>
1111
</parent>
1212

1313
<licenses>

doc/upgrading.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ These are notes to assist upgrading to newer versions.
44
See the [NEWS](../NEWS.md) summary of changes for each version.
55

66
<!-- ../../okapi/doc/md2toc -l 2 -h 3 upgrading.md -->
7+
* [Version 36.0](#version-360)
8+
* [Version 35.4](#version-354)
79
* [Version 35.3](#version-353)
810
* [Version 35.2](#version-352)
911
* [Version 35.1](#version-351)
@@ -26,10 +28,55 @@ See the [NEWS](../NEWS.md) summary of changes for each version.
2628
* [Version 25](#version-25)
2729
* [Version 20](#version-20)
2830

31+
## Version 36.0
32+
33+
36.0.\* is the Trillium version.
34+
35+
See also the [FOLIO Vert.x 5 migration notes](https://folio-org.atlassian.net/wiki/spaces/FOLIJET/pages/1003847853/Migration+to+Vertx+5).
36+
37+
All command line options must be passed as system properties using `-D` before the `-jar` argument. `MODULE_SPECIFIC_ARGS` no longer exists.
38+
Modules should prefer environment variables.
39+
40+
In the log4j pattern (used in log4j2.properties and log4j2-json.properties) upcase id:
41+
* `FolioLoggingContext:requestid` -> `FolioLoggingContext:requestId`
42+
* `FolioLoggingContext:tenantid` -> `FolioLoggingContext:tenantId`
43+
* `FolioLoggingContext:userid` -> `FolioLoggingContext:userId`
44+
* `FolioLoggingContext:moduleid` -> `FolioLoggingContext:moduleId`
45+
46+
In pom.xml file add `ServicesResourceTransformer` to the `maven-shade-plugin` configuration.
47+
```xml
48+
<configuration>
49+
<transformers>
50+
...
51+
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
52+
</transformers>
53+
</configuration>
54+
```
55+
56+
Consider replacing
57+
* `org.apache.hc.core5.http.HttpHeaders` with `org.folio.HttpHeaders`
58+
* `org.apache.hc.core5.http.HttpStatus` with `org.folio.HttpStatus`
59+
* `org.apache.http.HttpHeaders` with `org.folio.HttpHeaders`
60+
* `org.apache.http.HttpStatus` with `org.folio.HttpStatus`
61+
They are drop-in replacements and may allow to drop the `org.apache.httpcomponents.core5:httpcore5`
62+
or `org.apache.httpcomponents:httpcore` dependency reducing the runtime size.
63+
64+
## Version 35.4
65+
66+
35.4.\* is the Sunflower (R1 2025) version.
67+
68+
RMB >= 35.4.2 requires Vert.x >= 4.5.23.
69+
70+
RMB 35.4.0 and 35.4.1 require Vert.x <= 4.5.22.
71+
2972
## Version 35.3
3073

3174
35.3.\* is the Ramsons (R2 2024) version.
3275

76+
RMB >= 35.3.2 requires Vert.x >= 4.5.23.
77+
78+
RMB 35.3.0 and 35.3.1 require Vert.x <= 4.5.22.
79+
3380
Don't use `JsonObject.mapFrom` to serialize a Java class instance to JSON,
3481
RMB's database methods take a Java class and automatically serialize it. When writing custom SQL use
3582
`ObjectMapperTool.valueAsString` to serialize in a way compatible with RMB's deserializer.

domain-models-api-aspects/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>org.folio</groupId>
55
<artifactId>raml-module-builder</artifactId>
6-
<version>35.5.0-SNAPSHOT</version>
6+
<version>36.0.0-SNAPSHOT</version>
77
</parent>
88
<artifactId>domain-models-api-aspects</artifactId>
99

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
# variables are substituted from filters-[production|development].properties
2-
log4j.rootLogger=INFO, CONSOLE
3-
#log4j.rootLogger=DEBUG, CONSOLE
41

5-
# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
6-
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
7-
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
8-
log4j.appender.CONSOLE.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss:SSS} %-5p %C{1} %X{reqId} %m%n
2+
# Log4j 2 properties configuration
3+
status = error
4+
name = PropertiesConfig
5+
6+
# Console appender
7+
appender.console.type = Console
8+
appender.console.name = CONSOLE
9+
appender.console.layout.type = PatternLayout
10+
appender.console.layout.pattern = %d{dd MMM yyyy HH:mm:ss:SSS} %-5p %C{1} %X{reqId} %m%n
11+
12+
# Root logger
13+
rootLogger.level = info
14+
rootLogger.appenderRefs = console
15+
rootLogger.appenderRef.console.ref = CONSOLE

domain-models-api-interfaces/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>org.folio</groupId>
55
<artifactId>raml-module-builder</artifactId>
6-
<version>35.5.0-SNAPSHOT</version>
6+
<version>36.0.0-SNAPSHOT</version>
77
</parent>
88
<artifactId>domain-models-api-interfaces</artifactId>
99

0 commit comments

Comments
 (0)