Skip to content

Commit 56a600f

Browse files
authoredDec 25, 2024··
feat: move to grace period from grace attempts (#172)
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
1 parent fd66a39 commit 56a600f

File tree

2 files changed

+61
-55
lines changed

2 files changed

+61
-55
lines changed
 

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ The Gherkin files structure can be linted using [gherkin-lint](https://github.co
3838

3939
1. npm install
4040
1. npm run gherkin-lint
41+

‎gherkin/config.feature

+60-55
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Feature: Configuration Test
1414
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | deadline for streaming calls, useful as an application-layer keepalive | int | 600000 | rpc & in-process |
1515
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | initial backoff for stream retry | int | 1000 | rpc & in-process |
1616
| retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | maximum backoff for stream retry | int | 120000 | rpc & in-process |
17-
| retryGraceAttempts | FLAGD_RETRY_GRACE_ATTEMPTS | amount of stream retry attempts before provider moves from STALE to ERROR state | int | 5 | rpc & in-process |
17+
| retryGracePeriod | FLAGD_RETRY_GRACE_PERIOD | time before provider moves from STALE to ERROR state | int | 5 | rpc & in-process |
1818
| keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | http 2 keepalive | long | 0 | rpc & in-process |
1919
| cache | FLAGD_CACHE | enable cache of static flags | String - `lru`, `disabled` | lru | rpc |
2020
| maxCacheSize | FLAGD_MAX_CACHE_SIZE | max size of static flag cache | int | 1000 | rpc |
@@ -49,21 +49,21 @@ Feature: Configuration Test
4949
| socketPath | String | null |
5050
@events
5151
Examples: Events
52-
| option | type | default |
53-
| streamDeadlineMs | Integer | 600000 |
54-
| keepAliveTime | Long | 0 |
55-
| retryBackoffMs | Integer | 1000 |
56-
| retryBackoffMaxMs | Integer | 120000 |
57-
| retryGraceAttempts | Integer | 5 |
52+
| option | type | default |
53+
| streamDeadlineMs | Integer | 600000 |
54+
| keepAliveTime | Long | 0 |
55+
| retryBackoffMs | Integer | 1000 |
56+
| retryBackoffMaxMs | Integer | 120000 |
57+
| retryGracePeriod | Integer | 5 |
5858
@sync
5959
Examples: Sync
60-
| option | type | default |
61-
| streamDeadlineMs | Integer | 600000 |
62-
| keepAliveTime | Long | 0 |
63-
| retryBackoffMs | Integer | 1000 |
64-
| retryBackoffMaxMs | Integer | 120000 |
65-
| retryGraceAttempts | Integer | 5 |
66-
| selector | String | null |
60+
| option | type | default |
61+
| streamDeadlineMs | Integer | 600000 |
62+
| keepAliveTime | Long | 0 |
63+
| retryBackoffMs | Integer | 1000 |
64+
| retryBackoffMaxMs | Integer | 120000 |
65+
| retryGracePeriod | Integer | 5 |
66+
| selector | String | null |
6767
@caching
6868
Examples: caching
6969
| option | type | default |
@@ -77,20 +77,23 @@ Feature: Configuration Test
7777

7878
@rpc
7979
Scenario Outline: Default Config RPC
80-
When a config was initialized for "rpc"
80+
Given an option "resolver" of type "ResolverType" with value "rpc"
81+
When a config was initialized
8182
Then the option "<option>" of type "<type>" should have the value "<default>"
8283
Examples:
8384
| option | type | default |
8485
| port | Integer | 8013 |
8586

8687
@in-process
8788
Scenario Outline: Default Config In-Process
88-
When a config was initialized for "in-process"
89+
Given an option "resolver" of type "ResolverType" with value "in-process"
90+
When a config was initialized
8991
Then the option "<option>" of type "<type>" should have the value "<default>"
9092
Examples:
9193
| option | type | default |
9294
| port | Integer | 8015 |
9395

96+
@rpc @in-process
9497
Scenario Outline: Dedicated Config
9598
Given an option "<option>" of type "<type>" with value "<value>"
9699
When a config was initialized
@@ -116,21 +119,21 @@ Feature: Configuration Test
116119
| socketPath | String | path |
117120
@events
118121
Examples:
119-
| option | type | value |
120-
| streamDeadlineMs | Integer | 500000 |
121-
| keepAliveTime | Long | 5 |
122-
| retryBackoffMs | Integer | 5000 |
123-
| retryBackoffMaxMs | Integer | 12000 |
124-
| retryGraceAttempts | Integer | 10 |
122+
| option | type | value |
123+
| streamDeadlineMs | Integer | 500000 |
124+
| keepAliveTime | Long | 5 |
125+
| retryBackoffMs | Integer | 5000 |
126+
| retryBackoffMaxMs | Integer | 12000 |
127+
| retryGracePeriod | Integer | 10 |
125128
@sync
126129
Examples:
127-
| option | type | value |
128-
| streamDeadlineMs | Integer | 500000 |
129-
| keepAliveTime | Long | 5 |
130-
| retryBackoffMs | Integer | 5000 |
131-
| retryBackoffMaxMs | Integer | 12000 |
132-
| retryGraceAttempts | Integer | 10 |
133-
| selector | String | selector |
130+
| option | type | value |
131+
| streamDeadlineMs | Integer | 500000 |
132+
| keepAliveTime | Long | 5 |
133+
| retryBackoffMs | Integer | 5000 |
134+
| retryBackoffMaxMs | Integer | 12000 |
135+
| retryGracePeriod | Integer | 10 |
136+
| selector | String | selector |
134137
@caching
135138
Examples:
136139
| option | type | value |
@@ -142,6 +145,7 @@ Feature: Configuration Test
142145
| offlineFlagSourcePath | String | path |
143146
| offlinePollIntervalMs | Integer | 1000 |
144147

148+
@rpc @in-process
145149
Scenario Outline: Dedicated Config via Env_var
146150
Given an environment variable "<env>" with value "<value>"
147151
When a config was initialized
@@ -170,21 +174,21 @@ Feature: Configuration Test
170174
| socketPath | FLAGD_SOCKET_PATH | String | path |
171175
@events
172176
Examples:
173-
| option | env | type | value |
174-
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 |
175-
| keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 |
176-
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 |
177-
| retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | Integer | 12000 |
178-
| retryGraceAttempts | FLAGD_RETRY_GRACE_ATTEMPTS | Integer | 10 |
177+
| option | env | type | value |
178+
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 |
179+
| keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 |
180+
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 |
181+
| retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | Integer | 12000 |
182+
| retryGracePeriod | FLAGD_RETRY_GRACE_PERIOD | Integer | 10 |
179183
@sync
180184
Examples:
181-
| option | env | type | value |
182-
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 |
183-
| keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 |
184-
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 |
185-
| retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | Integer | 12000 |
186-
| retryGraceAttempts | FLAGD_RETRY_GRACE_ATTEMPTS | Integer | 10 |
187-
| selector | FLAGD_SOURCE_SELECTOR | String | selector |
185+
| option | env | type | value |
186+
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 |
187+
| keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 |
188+
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 |
189+
| retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | Integer | 12000 |
190+
| retryGracePeriod | FLAGD_RETRY_GRACE_PERIOD | Integer | 10 |
191+
| selector | FLAGD_SOURCE_SELECTOR | String | selector |
188192
@caching
189193
Examples:
190194
| option | env | type | value |
@@ -196,6 +200,7 @@ Feature: Configuration Test
196200
| offlineFlagSourcePath | FLAGD_OFFLINE_FLAG_SOURCE_PATH | String | path |
197201
| offlinePollIntervalMs | FLAGD_OFFLINE_POLL_MS | Integer | 1000 |
198202

203+
@rpc @in-process
199204
Scenario Outline: Dedicated Config via Env_var and set
200205
Given an environment variable "<env>" with value "<env-value>"
201206
And an option "<option>" of type "<type>" with value "<value>"
@@ -222,21 +227,21 @@ Feature: Configuration Test
222227
| socketPath | FLAGD_SOCKET_PATH | String | path | rpc |
223228
@events
224229
Examples:
225-
| option | env | type | value | env-value |
226-
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 | 400 |
227-
| keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 | 4 |
228-
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 | 4 |
229-
| retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | Integer | 12000 | 4 |
230-
| retryGraceAttempts | FLAGD_RETRY_GRACE_ATTEMPTS | Integer | 10 | 4 |
230+
| option | env | type | value | env-value |
231+
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 | 400 |
232+
| keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 | 4 |
233+
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 | 4 |
234+
| retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | Integer | 12000 | 4 |
235+
| retryGracePeriod | FLAGD_RETRY_GRACE_PERIOD | Integer | 10 | 4 |
231236
@sync
232237
Examples:
233-
| option | env | type | value | env-value |
234-
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 | 400 |
235-
| keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 | 4 |
236-
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 | 4 |
237-
| retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | Integer | 12000 | 4 |
238-
| retryGraceAttempts | FLAGD_RETRY_GRACE_ATTEMPTS | Integer | 10 | 4 |
239-
| selector | FLAGD_SOURCE_SELECTOR | String | selector | sele |
238+
| option | env | type | value | env-value |
239+
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | Integer | 500000 | 400 |
240+
| keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | Long | 5 | 4 |
241+
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | Integer | 5000 | 4 |
242+
| retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | Integer | 12000 | 4 |
243+
| retryGracePeriod | FLAGD_RETRY_GRACE_PERIOD | Integer | 10 | 4 |
244+
| selector | FLAGD_SOURCE_SELECTOR | String | selector | sele |
240245
@caching
241246
Examples:
242247
| option | env | type | value | env-value |

0 commit comments

Comments
 (0)
Please sign in to comment.