Skip to content

Commit 380e903

Browse files
authored
Merge branch 'folio-org:master' into deployment
2 parents 9d2b06f + 3f6567d commit 380e903

File tree

290 files changed

+7958
-3758
lines changed

Some content is hidden

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

290 files changed

+7958
-3758
lines changed

.editorconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ root = true
66
[*]
77
trim_trailing_whitespace = true
88
insert_final_newline = true
9-
max_line_length = 80
9+
max_line_length = 120
1010
indent_style = space
1111
indent_size = 2
1212

1313
# 4 space indentation
1414
[*.py]
15-
indent_style = space
1615
indent_size = 4

.github/workflows/api-doc.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@ on:
3333
paths:
3434
- 'ramls/**'
3535
tags: '[vV][0-9]+.[0-9]+.[0-9]+*'
36+
workflow_dispatch:
3637

3738
jobs:
3839
api-doc:
3940
runs-on: ubuntu-latest
4041
steps:
4142
- name: Checkout
42-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4344
with:
4445
ref: ${{ github.REF }}
4546
submodules: recursive

.github/workflows/api-lint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@ on:
3333
pull_request:
3434
paths:
3535
- 'ramls/**'
36+
workflow_dispatch:
3637

3738
jobs:
3839
api-lint:
3940
runs-on: ubuntu-latest
4041
steps:
4142
- name: Checkout
42-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4344
with:
4445
submodules: recursive
4546
- name: Prepare folio-tools

.github/workflows/api-schema-lint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ on:
2323
pull_request:
2424
paths:
2525
- 'ramls/**'
26+
workflow_dispatch:
2627

2728
jobs:
2829
api-schema-lint:
2930
runs-on: ubuntu-latest
3031
steps:
3132
- name: Checkout
32-
uses: actions/checkout@v3
33+
uses: actions/checkout@v4
3334
with:
3435
submodules: recursive
3536
- name: Prepare folio-tools

.github/workflows/mac.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/setup-java@v3
1616
with:
1717
distribution: 'temurin'
18-
java-version: '17'
18+
java-version: '21'
1919
cache: maven
2020
- run: mvn clean install -DskipTests
2121
- run: brew install ${{ matrix.postgres }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM folioci/alpine-jre-openjdk17:latest
1+
FROM folioci/alpine-jre-openjdk21:latest
22

33
# Install latest patch versions of packages: https://pythonspeed.com/articles/security-updates-in-docker/
44
USER root

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildMvn {
55
mvnDeploy = 'yes'
66
doKubeDeploy = true
77
publishPreview = false
8-
buildNode = 'jenkins-agent-java17'
8+
buildNode = 'jenkins-agent-java21'
99

1010
doDocker = {
1111
buildJavaDocker {

NEWS.md

Lines changed: 103 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,107 @@
1-
## v27.2.0 In progress
1+
## v29.1.0 YYYY-mm-DD
2+
### Breaking changes
3+
* Description ([ISSUE](https://folio-org.atlassian.net/browse/ISSUE))
4+
5+
### New APIs versions
6+
* Provides `item-storage 10.2`
7+
8+
### Features
9+
* Make max.request.size configurable for reindex holdings/items producers ([MODINVSTOR-1372](https://folio-org.atlassian.net/browse/MODINVSTOR-1372))
10+
* Create index for discoverySuppress and source fields to improve performance of queries which include mentioned fields ([MODINVSTOR-1377](https://folio-org.atlassian.net/browse/MODINVSTOR-1377))
11+
* Introduce new post retrieve api to fetch inventory item ([MODINVSTOR-1381](https://folio-org.atlassian.net/browse/MODINVSTOR-1381))
12+
* Optimize reindex instances database fetch query ([MODINVSTOR-1395](https://folio-org.atlassian.net/browse/MODINVSTOR-1395))
13+
14+
### Bug fixes
15+
* Fix ordering of electronic access items for inventory-hierarchy, oai-pmh-view ([MODINVSTOR-1224](https://folio-org.atlassian.net/browse/MODINVSTOR-1224))
16+
* Fix error serialization when writing to files uploaded to S3 ([MODINVSTOR-1389](https://folio-org.atlassian.net/browse/MODINVSTOR-1389))
17+
18+
### Tech Dept
19+
* Description ([ISSUE](https://folio-org.atlassian.net/browse/ISSUE))
20+
21+
### Dependencies
22+
* Bump `LIB_NAME` from `OLD_VERSION` to `NEW_VERSION`
23+
* Add `LIB_NAME VERSION`
24+
* Remove `LIB_NAME`
25+
26+
---
27+
28+
## v29.0.0 2025-03-13
29+
### Breaking changes
30+
* Upgrade to Java 21 ([MODINVSTOR-1364](https://folio-org.atlassian.net/browse/MODINVSTOR-1364))
31+
* Remove deprecated batch API `/instance-storage/batch/instances` ([MODINVSTOR-1182](https://folio-org.atlassian.net/browse/MODINVSTOR-1182))
32+
33+
### New APIs versions
34+
* Provides `inventory-hierarchy 0.6`
35+
* Provides `instance-storage v11.1`
36+
* Disables `instance-storage-batch`
37+
38+
### Features
39+
* Add new location property locationName that points to location name. ([MODINVSTOR-1362](https://folio-org.atlassian.net/browse/MODINVSTOR-1362))
40+
* Update rollback mechanism for instances when linking/unlinking with subjects is failed. ([MODINVSTOR-1299](https://folio-org.atlassian.net/browse/MODINVSTOR-1299))
41+
* Unable to delete local Subject types/sources when they are linked to an Instance ([MODINVSTOR-1284](https://folio-org.atlassian.net/browse/MODINVSTOR-1284))
42+
* Modify endpoint for bulk instances upsert with publish events flag ([MODINVSTOR-1283](https://folio-org.atlassian.net/browse/MODINVSTOR-1283))
43+
* Change Kafka event publishing keys for holdings and items ([MODINVSTOR-1281](https://folio-org.atlassian.net/browse/MODINVSTOR-1281))
44+
* Merge custom ECS TLR feature branch into master ([MODINVSTOR-1262](https://folio-org.atlassian.net/browse/MODINVSTOR-1262))
45+
* Service points synchronization: implement processors ([MODINVSTOR-1246](https://folio-org.atlassian.net/browse/MODINVSTOR-1246))
46+
* Service points synchronization: create a verticle ([MODINVSTOR-1245](https://folio-org.atlassian.net/browse/MODINVSTOR-1245))
47+
* Do not return routing service points by default ([MODINVSTOR-1219](https://folio-org.atlassian.net/browse/MODINVSTOR-1219))
48+
* Implement Kafka Event Publishing for Call-Number Type CRUD Operations ([MODINVSTOR-1275](https://folio-org.atlassian.net/browse/MODINVSTOR-1275))
49+
* Extend domain events with eventId and eventTs ([MODINVSTOR-1322](https://folio-org.atlassian.net/browse/MODINVSTOR-1322))
50+
* Revert the publication period migration changes ([MODINVSTOR-1280](https://folio-org.atlassian.net/browse/MODINVSTOR-1280))
51+
* Optimize check for existing shadow Instance before creating it ([MODINVSTOR-1354](https://folio-org.atlassian.net/browse/MODINVSTOR-1354))
52+
* Add "deleted" field to Instance schema ([MODINVSTOR-1342](https://folio-org.atlassian.net/browse/MODINVSTOR-1342))
53+
* Perform bulk in transaction to prevent Optimistic Locking ([MODINVSTOR-1369](https://folio-org.atlassian.net/browse/MODINVSTOR-1369))
54+
* Prevent update of instance/item/holdings in case there are no changes ([MODINVSTOR-1363](https://folio-org.atlassian.net/browse/MODINVSTOR-1363))
55+
56+
### Bug fixes
57+
* Add item barcode right truncation search index ([MODINVSTOR-1292](https://folio-org.atlassian.net/browse/MODINVSTOR-1292))
58+
* Sort holdings by location name in instanceId query ([MODINVSTOR-1343](https://folio-org.atlassian.net/browse/MODINVSTOR-1343))
59+
60+
### Tech Dept
61+
* Delete 3 unused instance database indexes ([MODINVSTOR-1277](https://folio-org.atlassian.net/browse/MODINVSTOR-1277))
62+
63+
### Dependencies
64+
* Bump `raml-module-builder` from `35.3.0` to `35.4.0`
65+
* Bump `folio-kafka-wrapper` from `3.2.0` to `3.3.1`
66+
* Bump `folio-s3-client` from `2.2.0` to `2.3.0`
67+
* Bump `vertx` from `4.5.10` to `4.5.13`
68+
* Bump `caffeine` from `3.1.8` to `3.2.0`
69+
* Bump `lombok` from `1.18.34` to `1.18.36`
70+
* Bump `log4j` from `2.24.1` to `2.24.3`
71+
* Remove `google-code-gson`
272

73+
---
74+
75+
## v28.0.0 2024-11-01
376
### Breaking changes
77+
* Migrate "publicationPeriod" data to the Dates object and remove it from the Instance schema ([MODINVSTOR-1232](https://folio-org.atlassian.net/browse/MODINVSTOR-1232))
78+
* Delete deprecated `shelf-locations` API ([MODINVSTOR-1183](https://folio-org.atlassian.net/browse/MODINVSTOR-1183))
479
* Required sourceId field in holdings record ([MODINVSTOR-1161](https://folio-org.atlassian.net/browse/MODINVSTOR-1161))
580

681
### New APIs versions
82+
* Provides `instance-storage 11.0`
83+
* Provides `instance-storage-batch 3.0`
84+
* Provides `instance-storage-batch-sync 3.0`
85+
* Provides `instance-storage-batch-sync-unsafe 3.0`
86+
* Provides `inventory-view 3.0`
87+
* Provides `inventory-view-instance-set 3.0`
88+
* Provides `instance-iteration 1.0`
89+
* Provides `holdings-storage 8.0`
90+
* Provides `bound-with-parts-storage 2.0`
91+
* Provides `async-migration 1.0`
792
* Provides `subject-source 1.0`
893
* Provides `subject-types 1.0`
94+
* Provides `instance-storage-bulk 1.0`
995
* Provides `instance-date-types 1.0`
10-
* Provides `instance-storage 10.2`
11-
* Requires `holdings-storage 6.1`
96+
* Provides `locations 3.1`
97+
98+
### Removed APIs
99+
* `shelf-locations`
12100

13101
### Features
102+
* Add floating collection flag in location schema ([MODINVSTOR-1250](https://issues.folio.org/browse/MODINVSTOR-1250))
14103
* Implement domain event production for location create/update/delete ([MODINVSTOR-1181](https://issues.folio.org/browse/MODINVSTOR-1181))
104+
* Add a new boolean field ecsRequestRouting to the service point schema ([MODINVSTOR-1179](https://issues.folio.org/browse/MODINVSTOR-1179))
15105
* Implement domain event production for library create/update/delete ([MODINVSTOR-1216](https://issues.folio.org/browse/MODINVSTOR-1216))
16106
* Implement domain event production for campus create/update/delete ([MODINVSTOR-1217](https://issues.folio.org/browse/MODINVSTOR-1217))
17107
* Implement domain event production for institution create/update/delete ([MODINVSTOR-1218](https://issues.folio.org/browse/MODINVSTOR-1218))
@@ -23,25 +113,26 @@
23113
* Info, not warn, about expected 403 from /user-tenants ([MODINVSTOR-1237](https://folio-org.atlassian.net/browse/MODINVSTOR-1237))
24114
* Implement Subject sources management ([MODINVSTOR-1222](https://folio-org.atlassian.net/browse/MODINVSTOR-1222))
25115
* Add new date type fields to Instance schema ([MODINVSTOR-1188](https://folio-org.atlassian.net/browse/MODINVSTOR-1188))
26-
116+
* Implement endpoint for bulk instances upsert from external file ([MODINVSTOR-1225](https://folio-org.atlassian.net/browse/MODINVSTOR-1225))
117+
* Add Subject source and Subject type to schema ([MODINVSTOR-1205](https://folio-org.atlassian.net/browse/MODINVSTOR-1205))
118+
* Add codes to Subject sources ([MODINVSTOR-1264](https://folio-org.atlassian.net/browse/MODINVSTOR-1264))
119+
* Implement publication period migration, create new InstanceWithoutPubPeriod schema for request/response API ([MODINVSTOR-1271](https://folio-org.atlassian.net/browse/MODINVSTOR-1271))
27120

28121
### Bug fixes
29122
* Unintended update of instance records \_version (optimistic locking) whenever any of its holdings or items are created, updated or deleted. ([MODINVSTOR-1186](https://folio-org.atlassian.net/browse/MODINVSTOR-1186))
30123
* Deserialization of Date from long (MODINVSTOR-1198)[https://folio-org.atlassian.net/browse/MODINVSTOR-1198]
31124
* Do not delete Kafka topics on postTenant if collection topics is enabled ([MODINVSTOR-1192](https://folio-org.atlassian.net/browse/MODINVSTOR-1192))
32125
* Identifier types: change Cancelled LCCN to Canceled LCCN ([MODINVSTOR-1212](https://folio-org.atlassian.net/browse/MODINVSTOR-1212))
126+
* Add user-tenants.collection.get to all ECS APIs ([MODINVSTOR-1253](https://folio-org.atlassian.net/browse/MODINVSTOR-1253))
127+
* Add user-tenants.collection.get to POST /\_/tenant API ([MODINVSTOR-1260](https://folio-org.atlassian.net/browse/MODINVSTOR-1260))
128+
* Update "BC" name in GET instance-date-type to "B.C." ([MODINVSTOR-1255](https://folio-org.atlassian.net/browse/MODINVSTOR-1255))
33129

34130
### Tech Dept
131+
* Upgrade localstack from 0.11.3 to s3-latest (=3.8.0) ([MODINVSTOR-1272](https://folio-org.atlassian.net/browse/MODINVSTOR-1272))
132+
* Add module descriptor validator plugin and fix the permission names ([MODINVSTOR-1247](https://folio-org.atlassian.net/browse/MODINVSTOR-1247))
35133
* Kafka testcontainers: kafka.KafkaContainer, apache/kafka-native:3.8.0, KafkaTopicsExistsTest fix ([MODINVSTOR-1251](https://folio-org.atlassian.net/browse/MODINVSTOR-1251))
36134

37-
### Dependencies
38-
* Bump `LIB_NAME` from `OLD_VERSION` to `NEW_VERSION`
39-
* Bump `domain-models-runtime` from `35.2.0` to `35.2.2`
40-
* Bump `holdings-storage` from `6.0` to `7.0`
41-
* Bump `holdings-storage-batch-sync` from `1.1` to `2.0`
42-
* Bump `holdings-storage-batch-sync-unsafe` from `1.0` to `2.0`
43-
* Add `LIB_NAME` `2.7.4`
44-
* Remove `LIB_NAME`
135+
---
45136

46137
## v27.1.0 2024-03-19
47138
### New APIs versions
@@ -64,7 +155,6 @@
64155
* Create base for reference data APIs integration tests ([MODINVSTOR-1164](https://issues.folio.org/browse/MODINVSTOR-1164))
65156
* Make response message more informative for hrid exceptions ([MODINVSTOR-1100](https://issues.folio.org/browse/MODINVSTOR-1100))
66157

67-
68158
### Dependencies
69159
* Bump `vertx` from `4.3.5` to `4.5.5`
70160
* Bump `log4j` from `2.17.2` to `2.23.1`

README.MD

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ Version 2.0. See the file "[LICENSE](LICENSE)" for more information.
4040
* [Appendix 1 - Docker Information](#appendix-1---docker-information)
4141
* [When Using the Modules as Docker Containers](#when-using-the-modules-as-docker-containers)
4242
* [Finding a Routable Address](#finding-a-routable-address)
43-
* [Batch interface](#batch-interface)
4443
* [HRID Management](#hrid-management)
4544
* [Inventory view endpoint](#inventory-view-endpoint)
4645
* [Domain event pattern](#domain-event-pattern)
@@ -106,6 +105,7 @@ These properties can be changed by setting env variable.
106105

107106
* `KAFKA_DOMAIN_TOPIC_NUM_PARTITIONS` Default value - `50`
108107
* `KAFKA_CLASSIFICATION_TYPE_TOPIC_NUM_PARTITIONS` Default value - `1`
108+
* `KAFKA_CALL_NUMBER_TYPE_TOPIC_NUM_PARTITIONS` Default value - `1`
109109
* `KAFKA_LOCATION_TOPIC_NUM_PARTITIONS` Default value - `1`
110110
* `KAFKA_LIBRARY_TOPIC_NUM_PARTITIONS` Default value - `1`
111111
* `KAFKA_CAMPUS_TOPIC_NUM_PARTITIONS` Default value - `1`
@@ -114,6 +114,20 @@ These properties can be changed by setting env variable.
114114
* `KAFKA_REINDEX_RECORDS_TOPIC_NUM_PARTITIONS` Default value - `16`
115115
* `KAFKA_SUBJECT_SOURCE_TOPIC_NUM_PARTITIONS` Default value - `1`
116116

117+
There is also possibility for customizing through properties the Kafka Topic
118+
`message retention` (in milliseconds) and `maximum message size` (in bytes). The default values of these configurations
119+
for any topic are 604800000 milliseconds (or 1 week) and 1048576 bytes (or 1 MB) respectively
120+
121+
These are the defined topic properties for `message retention` and `maximum message size` for `reindex-records` topic
122+
123+
* `KAFKA_REINDEX_RECORDS_TOPIC_MESSAGE_RETENTION` Default value - `86400000` (1 day)
124+
* `KAFKA_REINDEX_RECORDS_TOPIC_MAX_MESSAGE_SIZE` Default value - `10485760` (10 MB)
125+
126+
in case, any of these topic properties are changed for `reindex-records` the topic needs to be recreated and module needs to be reinstalled.
127+
128+
Changing maximum message size for kafka producer:
129+
* `KAFKA_REINDEX_PRODUCER_MAX_REQUEST_SIZE_BYTES` Default value - `10485760` (10 MB)
130+
117131
# Building
118132

119133
run `mvn install` from the root directory.
@@ -128,20 +142,24 @@ These environment variables configure Kafka, for details see [Kafka](#kafka):
128142
* `REPLICATION_FACTOR`
129143
* `KAFKA_DOMAIN_TOPIC_NUM_PARTITIONS`
130144
* `KAFKA_CLASSIFICATION_TYPE_TOPIC_NUM_PARTITIONS`
145+
* `KAFKA_CALL_NUMBER_TYPE_TOPIC_NUM_PARTITIONS`
131146
* `KAFKA_SUBJECT_TYPE_TOPIC_NUM_PARTITIONS`
132147
* `KAFKA_REINDEX_RECORDS_TOPIC_NUM_PARTITIONS`
133148
* `KAFKA_SUBJECT_SOURCE_TOPIC_NUM_PARTITIONS`
134149

135150

136151
These environment variables configure Kafka topic for specific business-related topics
137152
* `KAFKA_CLASSIFICATION_TYPE_TOPIC_NUM_PARTITIONS`
153+
* `KAFKA_CALL_NUMBER_TYPE_TOPIC_NUM_PARTITIONS`
138154
* `KAFKA_LOCATION_TOPIC_NUM_PARTITIONS`
139155
* `KAFKA_LIBRARY_TOPIC_NUM_PARTITIONS`
140156
* `KAFKA_CAMPUS_TOPIC_NUM_PARTITIONS`
141157
* `KAFKA_INSTITUTION_TOPIC_NUM_PARTITIONS`
142158
* `KAFKA_SUBJECT_TYPE_TOPIC_NUM_PARTITIONS`
143159
* `KAFKA_REINDEX_RECORDS_TOPIC_NUM_PARTITIONS`
144160
* `KAFKA_SUBJECT_SOURCE_TOPIC_NUM_PARTITIONS`
161+
* `KAFKA_REINDEX_RECORDS_TOPIC_MESSAGE_RETENTION`
162+
* `KAFKA_REINDEX_RECORDS_TOPIC_MAX_MESSAGE_SIZE`
145163

146164
mod-inventory-storage also supports all Raml Module Builder (RMB) environment variables,
147165
for details see [RMB](https://github.com/folio-org/raml-module-builder#environment-variables):
@@ -163,6 +181,15 @@ for details see [RMB](https://github.com/folio-org/raml-module-builder#environme
163181
* `DB_EXPLAIN_QUERY_THRESHOLD`
164182
* `DB_ALLOW_SUPPRESS_OPTIMISTIC_LOCKING`
165183

184+
These environment variables configure the module interaction with S3-compatible storage (AWS S3, Minio Server):
185+
* `S3_URL` (default value - `http://127.0.0.1:9000`)
186+
* `S3_REGION`
187+
* `S3_BUCKET` (default value - `marc-migrations`)
188+
* `S3_ACCESS_KEY_ID`
189+
* `S3_SECRET_ACCESS_KEY`
190+
* `S3_IS_AWS` (default value - `false`)
191+
* `ECS_TLR_FEATURE_ENABLED` (default value - `false`)
192+
166193
# Local Deployment using Docker
167194

168195
## Preparation
@@ -315,27 +342,6 @@ On Linux, `ifconfig docker0 | grep 'inet addr:'` should give output similar to `
315342

316343
On Mac OS X (using Docker Native), `ifconfig en0 | grep 'inet '` should give output similar to `inet 192.168.X.X netmask 0xffffff00 broadcast 192.168.X.X`, the first IP address is usually routable from within containers.
317344

318-
# Batch interface
319-
320-
Batch interface was introduced for processing a collection of entities in bulk. It is not transactional, each entity is processed separately, response contains combined results of processing.
321-
322-
###Design for batch save Instances endpoint
323-
_Method_: POST
324-
325-
_Resource_: /instance-storage/batch/instances (interface "instance-storage-batch")
326-
327-
_Body_: collection of Instances and total number of Instances
328-
329-
_Returns_: collection of successfully created Instances, error messages for failure Instances, total number of created Instances:
330-
331-
- If at least one Instance is successfully saved - returns 201 response with saved instances ("instances" section), "errorMessages" array contains errors for failed Instances (empty if all Instances are successfully saved).
332-
333-
- If save for all Instances failed - returns 500 response with "errorMessages" array, explaining a reason of why Instances were processed with failures (one error message per one Instance). Instances array is empty.
334-
335-
Regardless the batch size, number of parallel connections to the db is limited to 4 by default. To override the default number of concurrent db connections - "inventory.storage.parallel.db.connections.limit" program argument should be specified on module deployment.
336-
337-
`java -Dport=%p -jar ../mod-source-record-storage/mod-source-record-storage-server/target/mod-source-record-storage-server-fat.jar -Dhttp.port=%p embed_postgres=true inventory.storage.parallel.db.connections.limit=10`
338-
339345
# HRID Management
340346

341347
When instances, holdings records and items are added to inventory, they will be assigned a human

0 commit comments

Comments
 (0)