Skip to content

Commit

Permalink
[#1982]: fix: services.exec_timeout schema definition
Browse files Browse the repository at this point in the history
  • Loading branch information
gam6itko authored Jul 27, 2024
1 parent e6e4500 commit 8375d31
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 16 deletions.
11 changes: 8 additions & 3 deletions .rr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ service:

# Allowed time before stop.
#
# Default: 0 (infinity), can be 1s, 2m, 2h (seconds, minutes, hours)
# Default: 0 (infinity), can be 1s, 2m, 2h (seconds, minutes, hours) and complex 2h2m1s.
exec_timeout: 0s

# Show the name of the service in logs (e.g. service.some_service_1)
Expand Down Expand Up @@ -547,7 +547,7 @@ service:

# Allowed time before stop.
#
# Default: 0 (infinity), can be 1s, 2m, 2h (seconds, minutes, hours)
# Default: 0 (infinity), can be 1s, 2m, 2h (seconds, minutes, hours) and complex 2h2m1s.
exec_timeout: 0s

# Remain process after exit. In other words, restart process after exit with any exit code.
Expand Down Expand Up @@ -1930,6 +1930,7 @@ grpc:
# zero or the connection establishment.
#
# This option is optional. Default value: infinity.
# Can be 1s, 2m, 2h (seconds, minutes, hours) and complex 2h2m1s.
max_connection_idle: 0s

# MaxConnectionAge is a duration for the maximum amount of time a
Expand All @@ -1938,11 +1939,13 @@ grpc:
# connection storms.
#
# This option is optional. Default value: infinity.
# Can be 1s, 2m, 2h (seconds, minutes, hours) and complex 2h2m1s.
max_connection_age: 0s

# MaxConnectionAgeGrace is an additive period after MaxConnectionAge after
# which the connection will be forcibly closed.
max_connection_age_grace: 0s8h
# Can be 1s, 2m, 2h (seconds, minutes, hours) and complex 2h2m1s.
max_connection_age_grace: 8h

# MaxConnectionAgeGrace is an additive period after MaxConnectionAge after
# which the connection will be forcibly closed.
Expand All @@ -1955,13 +1958,15 @@ grpc:
# If set below 1s, a minimum value of 1s will be used instead.
#
# This option is optional. Default value: 2h
# Can be 1s, 2m, 2h (seconds, minutes, hours) and complex 2h2m1s.
ping_time: 1s

# After having pinged for keepalive check, the server waits for a duration
# of Timeout and if no activity is seen even after that the connection is
# closed.
#
# This option is optional. Default value: 20s
# Can be 1s, 2m, 2h (seconds, minutes, hours) and complex 2h2m1s.
timeout: 200s

# Usual workers pool configuration
Expand Down
15 changes: 9 additions & 6 deletions schemas/config/2.0.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2232,13 +2232,16 @@
"Duration": {
"description": "Time duration",
"type": "string",
"pattern": "^[0-9]+[ms]|[s,h]",
"pattern": "^([0-9]*(\\.[0-9]*)?(ms|h|m|s))+$",
"examples": [
"10h",
"1m",
"1h",
"30s",
"300ms"
"1h",
"2.5h",
"2m",
".2m",
"30s",
"30.03s",
"300ms",
"1h3m40s500ms"
]
},
"HostAndPortWithTCP": {
Expand Down
15 changes: 9 additions & 6 deletions schemas/config/3.0.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2359,14 +2359,17 @@
"Duration": {
"description": "Time duration",
"type": "string",
"pattern": "^[0-9]+[ms]|[s,h]",
"pattern": "^([0-9]*(\\.[0-9]*)?(ms|h|m|s))+$",
"examples": [
"10h",
"1m",
"1h",
"1h",
"2.5h",
"2m",
".2m",
"30s",
"300ms"
]
"30.03s",
"300ms",
"1h3m40s500ms"
]
},
"HostAndPortWithTCP": {
"description": "Host and port with tcp:// prefix",
Expand Down
2 changes: 1 addition & 1 deletion schemas/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This directory contains public schemas for the most important parts of applicati
- You can validate existing config file using the following command:

```bash
$ docker run --rm -v "$(pwd):/src" -w "/src" node:14-alpine sh -c \
docker run --rm -v "$(pwd):/src" -w "/src" node:14-alpine sh -c \
"npm install -g ajv-cli && \
ajv validate --all-errors --verbose \
-s ./schemas/config/3.0.schema.json \
Expand Down

0 comments on commit 8375d31

Please sign in to comment.