You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Bump version to `4.1.0` and update dependencies
* Use ConfiguredMongoClient for docs handler
* Add optional event_id field for publishing events
* Update config and readme
For production-ready deployment, we recommend using Kubernetes, however,
37
37
for simple use cases, you could execute the service using docker
38
38
on a single server:
39
39
```bash
40
40
# The entrypoint is preconfigured:
41
-
docker run -p 8080:8080 ghga/state-management-service:4.0.2 --help
41
+
docker run -p 8080:8080 ghga/state-management-service:4.1.0 --help
42
42
```
43
43
44
44
If you prefer not to use containers, you may install the service from source:
@@ -81,7 +81,7 @@ The service requires the following configuration parameters:
81
81
```
82
82
83
83
84
-
- <aid="properties/kafka_security_protocol"></a>**`kafka_security_protocol`***(string)*: Protocol used to communicate with brokers. Valid values are: PLAINTEXT, SSL. Must be one of: `["PLAINTEXT", "SSL"]`. Default: `"PLAINTEXT"`.
84
+
- <aid="properties/kafka_security_protocol"></a>**`kafka_security_protocol`***(string)*: Protocol used to communicate with brokers. Valid values are: PLAINTEXT, SSL. Must be one of: "PLAINTEXT" or "SSL". Default: `"PLAINTEXT"`.
85
85
86
86
- <aid="properties/kafka_ssl_cafile"></a>**`kafka_ssl_cafile`***(string)*: Certificate Authority file path containing certificates used to sign broker certificates. If a CA is not specified, the default system CA will be used if found by OpenSSL. Default: `""`.
87
87
@@ -106,7 +106,7 @@ The service requires the following configuration parameters:
106
106
```
107
107
108
108
109
-
- <aid="properties/kafka_max_message_size"></a>**`kafka_max_message_size`***(integer)*: The largest message size that can be transmitted, in bytes. Only services that have a need to send/receive larger messages should set this. Exclusive minimum: `0`. Default: `1048576`.
109
+
- <aid="properties/kafka_max_message_size"></a>**`kafka_max_message_size`***(integer)*: The largest message size that can be transmitted, in bytes, before compression. Only services that have a need to send/receive larger messages should set this. When used alongside compression, this value can be set to something greater than the broker's `message.max.bytes` field, which effectively concerns the compressed message size. Exclusive minimum: `0`. Default: `1048576`.
110
110
111
111
112
112
Examples:
@@ -121,6 +121,42 @@ The service requires the following configuration parameters:
121
121
```
122
122
123
123
124
+
- <aid="properties/kafka_compression_type"></a>**`kafka_compression_type`**: The compression type used for messages. Valid values are: None, gzip, snappy, lz4, and zstd. If None, no compression is applied. This setting is only relevant for the producer and has no effect on the consumer. If set to a value, the producer will compress messages before sending them to the Kafka broker. If unsure, zstd provides a good balance between speed and compression ratio. Default: `null`.
125
+
126
+
-**Any of**
127
+
128
+
- <aid="properties/kafka_compression_type/anyOf/0"></a>*string*: Must be one of: "gzip", "snappy", "lz4", or "zstd".
- <aid="properties/kafka_max_retries"></a>**`kafka_max_retries`***(integer)*: The maximum number of times to immediately retry consuming an event upon failure. Works independently of the dead letter queue. Minimum: `0`. Default: `0`.
125
161
126
162
@@ -418,7 +454,33 @@ The service requires the following configuration parameters:
418
454
```
419
455
420
456
421
-
- <aid="properties/log_level"></a>**`log_level`***(string)*: The minimum log level to capture. Must be one of: `["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG", "TRACE"]`. Default: `"INFO"`.
457
+
- <aid="properties/mongo_timeout"></a>**`mongo_timeout`**: Timeout in seconds for API calls to MongoDB. The timeout applies to all steps needed to complete the operation, including server selection, connection checkout, serialization, and server-side execution. When the timeout expires, PyMongo raises a timeout exception. If set to None, the operation will not time out (default MongoDB behavior). Default: `null`.
- <aid="properties/log_level"></a>**`log_level`***(string)*: The minimum log level to capture. Must be one of: "CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG", or "TRACE". Default: `"INFO"`.
422
484
423
485
- <aid="properties/log_format"></a>**`log_format`**: If set, will replace JSON formatting with the specified string format. If not set, has no effect. In addition to the standard attributes, the following can also be specified: timestamp, service, instance, level, correlation_id, and details. Default: `null`.
424
486
@@ -517,7 +579,7 @@ The service requires the following configuration parameters:
517
579
```
518
580
519
581
520
-
- <aid="properties/cors_allowed_headers"></a>**`cors_allowed_headers`**: A list of HTTP request headers that should be supported for cross-origin requests. Defaults to []. You can use ['*'] to allow all headers. The Accept, Accept-Language, Content-Language and Content-Type headers are always allowed for CORS requests. Default: `null`.
582
+
- <aid="properties/cors_allowed_headers"></a>**`cors_allowed_headers`**: A list of HTTP request headers that should be supported for cross-origin requests. Defaults to []. You can use ['*'] to allow all request headers. The Accept, Accept-Language, Content-Language, Content-Type and some are always allowed for CORS requests. Default: `null`.
521
583
522
584
-**Any of**
523
585
@@ -535,6 +597,24 @@ The service requires the following configuration parameters:
535
597
```
536
598
537
599
600
+
- <aid="properties/cors_exposed_headers"></a>**`cors_exposed_headers`**: A list of HTTP response headers that should be exposed for cross-origin responses. Defaults to []. Note that you can NOT use ['*'] to expose all response headers. The Cache-Control, Content-Language, Content-Length, Content-Type, Expires, Last-Modified and Pragma headers are always exposed for CORS responses. Default: `null`.
@@ -577,7 +657,7 @@ to talk to an S3 service in the backend.<br> Args:
577
657
```
578
658
579
659
580
-
- <a id="%24defs/S3Config/properties/s3_secret_access_key"></a>**`s3_secret_access_key`** *(string, format: password, required, write-only)*: Part of credentials for login into the S3 service. See: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html.
660
+
- <a id="%24defs/S3Config/properties/s3_secret_access_key"></a>**`s3_secret_access_key`** *(string, format: password, required and write-only)*: Part of credentials for login into the S3 service. See: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html.
581
661
582
662
583
663
Examples:
@@ -623,13 +703,13 @@ to talk to an S3 service in the backend.<br> Args:
Copy file name to clipboardExpand all lines: config_schema.json
+66-2Lines changed: 66 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -172,7 +172,7 @@
172
172
},
173
173
"kafka_max_message_size": {
174
174
"default": 1048576,
175
-
"description": "The largest message size that can be transmitted, in bytes. Only services that have a need to send/receive larger messages should set this.",
175
+
"description": "The largest message size that can be transmitted, in bytes, before compression. Only services that have a need to send/receive larger messages should set this. When used alongside compression, this value can be set to something greater than the broker's `message.max.bytes` field, which effectively concerns the compressed message size.",
176
176
"examples": [
177
177
1048576,
178
178
16777216
@@ -181,6 +181,32 @@
181
181
"title": "Kafka Max Message Size",
182
182
"type": "integer"
183
183
},
184
+
"kafka_compression_type": {
185
+
"anyOf": [
186
+
{
187
+
"enum": [
188
+
"gzip",
189
+
"snappy",
190
+
"lz4",
191
+
"zstd"
192
+
],
193
+
"type": "string"
194
+
},
195
+
{
196
+
"type": "null"
197
+
}
198
+
],
199
+
"default": null,
200
+
"description": "The compression type used for messages. Valid values are: None, gzip, snappy, lz4, and zstd. If None, no compression is applied. This setting is only relevant for the producer and has no effect on the consumer. If set to a value, the producer will compress messages before sending them to the Kafka broker. If unsure, zstd provides a good balance between speed and compression ratio.",
201
+
"examples": [
202
+
null,
203
+
"gzip",
204
+
"snappy",
205
+
"lz4",
206
+
"zstd"
207
+
],
208
+
"title": "Kafka Compression Type"
209
+
},
184
210
"kafka_max_retries": {
185
211
"default": 0,
186
212
"description": "The maximum number of times to immediately retry consuming an event upon failure. Works independently of the dead letter queue.",
@@ -408,6 +434,25 @@
408
434
"title": "Mongo Dsn",
409
435
"type": "string"
410
436
},
437
+
"mongo_timeout": {
438
+
"anyOf": [
439
+
{
440
+
"exclusiveMinimum": 0,
441
+
"type": "integer"
442
+
},
443
+
{
444
+
"type": "null"
445
+
}
446
+
],
447
+
"default": null,
448
+
"description": "Timeout in seconds for API calls to MongoDB. The timeout applies to all steps needed to complete the operation, including server selection, connection checkout, serialization, and server-side execution. When the timeout expires, PyMongo raises a timeout exception. If set to None, the operation will not time out (default MongoDB behavior).",
449
+
"examples": [
450
+
300,
451
+
600,
452
+
null
453
+
],
454
+
"title": "Mongo Timeout"
455
+
},
411
456
"log_level": {
412
457
"default": "INFO",
413
458
"description": "The minimum log level to capture.",
@@ -562,11 +607,30 @@
562
607
}
563
608
],
564
609
"default": null,
565
-
"description": "A list of HTTP request headers that should be supported for cross-origin requests. Defaults to []. You can use ['*'] to allow all headers. The Accept, Accept-Language, Content-Language and Content-Type headers are always allowed for CORS requests.",
610
+
"description": "A list of HTTP request headers that should be supported for cross-origin requests. Defaults to []. You can use ['*'] to allow all request headers. The Accept, Accept-Language, Content-Language, Content-Type and some are always allowed for CORS requests.",
566
611
"examples": [
567
612
[]
568
613
],
569
614
"title": "Cors Allowed Headers"
615
+
},
616
+
"cors_exposed_headers": {
617
+
"anyOf": [
618
+
{
619
+
"items": {
620
+
"type": "string"
621
+
},
622
+
"type": "array"
623
+
},
624
+
{
625
+
"type": "null"
626
+
}
627
+
],
628
+
"default": null,
629
+
"description": "A list of HTTP response headers that should be exposed for cross-origin responses. Defaults to []. Note that you can NOT use ['*'] to expose all response headers. The Cache-Control, Content-Language, Content-Length, Content-Type, Expires, Last-Modified and Pragma headers are always exposed for CORS responses.",
0 commit comments