Skip to content

Commit c1f632b

Browse files
authored
feat: add missing steps for config and improve wording (#311)
Signed-off-by: Simon Schrottner <[email protected]>
1 parent 1759a94 commit c1f632b

File tree

2 files changed

+46
-41
lines changed

2 files changed

+46
-41
lines changed

gherkin/config.feature

Lines changed: 45 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
Feature: Configuration Test
22
"""markdown
33
This is the official option configuration table
4-
| Option name | Environment variable name | Explanation | Type & Values | Default | Compatible resolver |
5-
| --------------------- | ------------------------------ | ------------------------------------------------------------------------------- | ---------------------------- | ----------------------------- | ------------------- |
6-
| resolver | FLAGD_RESOLVER | mode of operation | String - `rpc`, `in-process` | rpc | rpc & in-process |
7-
| host | FLAGD_HOST | remote host | String | localhost | rpc & in-process |
8-
| port | FLAGD_PORT | remote port | int | 8013 (rpc), 8015 (in-process) | rpc & in-process |
9-
| targetUri | FLAGD_TARGET_URI | alternative to host/port, supporting custom name resolution | string | null | rpc & in-process |
10-
| tls | FLAGD_TLS | connection encryption | boolean | false | rpc & in-process |
11-
| socketPath | FLAGD_SOCKET_PATH | alternative to host port, unix socket | String | null | rpc & in-process |
12-
| certPath | FLAGD_SERVER_CERT_PATH | tls cert path | String | null | rpc & in-process |
13-
| deadlineMs | FLAGD_DEADLINE_MS | deadline for unary calls, and timeout for initialization | int | 500 | rpc & in-process |
14-
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | deadline for streaming calls, useful as an application-layer keepalive | int | 600000 | rpc & in-process |
15-
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | initial backoff for stream retry | int | 1000 | rpc & in-process |
16-
| retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | maximum backoff for stream retry | int | 120000 | rpc & in-process |
17-
| retryGracePeriod | FLAGD_RETRY_GRACE_PERIOD | time before provider moves from STALE to ERROR state | int | 5 | rpc & in-process |
18-
| keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | http 2 keepalive | long | 0 | rpc & in-process |
19-
| cache | FLAGD_CACHE | enable cache of static flags | String - `lru`, `disabled` | lru | rpc |
20-
| maxCacheSize | FLAGD_MAX_CACHE_SIZE | max size of static flag cache | int | 1000 | rpc |
21-
| selector | FLAGD_SOURCE_SELECTOR | selects a single sync source to retrieve flags from only that source | string | null | in-process |
22-
| offlineFlagSourcePath | FLAGD_OFFLINE_FLAG_SOURCE_PATH | offline, file-based flag definitions, overrides host/port/targetUri | string | null | in-process |
23-
| offlinePollIntervalMs | FLAGD_OFFLINE_POLL_MS | poll interval for reading offlineFlagSourcePath | int | 5000 | in-process |
24-
| contextEnricher | - | sync-metadata to evaluation context mapping function | function | identity function | in-process |
25-
"""
4+
| Option name | Environment variable name | Explanation | Type & Values | Default | Compatible resolver |
5+
| --------------------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------- | ---------------------------- | ----------------------------- | ------------------- |
6+
| resolver | FLAGD_RESOLVER | mode of operation | String - `rpc`, `in-process` | rpc | rpc & in-process |
7+
| host | FLAGD_HOST | remote host | String | localhost | rpc & in-process |
8+
| port | FLAGD_PORT | remote port | int | 8013 (rpc), 8015 (in-process) | rpc & in-process |
9+
| targetUri | FLAGD_TARGET_URI | alternative to host/port, supporting custom name resolution | string | null | rpc & in-process |
10+
| tls | FLAGD_TLS | connection encryption | boolean | false | rpc & in-process |
11+
| socketPath | FLAGD_SOCKET_PATH | alternative to host port, unix socket | String | null | rpc & in-process |
12+
| certPath | FLAGD_SERVER_CERT_PATH | tls cert path | String | null | rpc & in-process |
13+
| deadlineMs | FLAGD_DEADLINE_MS | deadline for unary calls, and timeout for initialization | int | 500 | rpc & in-process |
14+
| streamDeadlineMs | FLAGD_STREAM_DEADLINE_MS | deadline for streaming calls, useful as an application-layer keepalive | int | 600000 | rpc & in-process |
15+
| retryBackoffMs | FLAGD_RETRY_BACKOFF_MS | initial backoff for stream retry | int | 1000 | rpc & in-process |
16+
| retryBackoffMaxMs | FLAGD_RETRY_BACKOFF_MAX_MS | maximum backoff for stream retry | int | 120000 | rpc & in-process |
17+
| retryGracePeriod | FLAGD_RETRY_GRACE_PERIOD | time before provider moves from STALE to ERROR state | int | 5 | rpc & in-process |
18+
| keepAliveTime | FLAGD_KEEP_ALIVE_TIME_MS | http 2 keepalive | long | 0 | rpc & in-process |
19+
| cache | FLAGD_CACHE | enable cache of static flags | String - `lru`, `disabled` | lru | rpc |
20+
| maxCacheSize | FLAGD_MAX_CACHE_SIZE | max size of static flag cache | int | 1000 | rpc |
21+
| selector | FLAGD_SOURCE_SELECTOR | selects a single sync source to retrieve flags from only that source | string | null | in-process |
22+
| offlineFlagSourcePath | FLAGD_OFFLINE_FLAG_SOURCE_PATH | offline, file-based flag definitions, overrides host/port/targetUri | string | null | in-process |
23+
| offlinePollIntervalMs | FLAGD_OFFLINE_POLL_MS | poll interval for reading offlineFlagSourcePath | int | 5000 | in-process |
24+
| contextEnricher | - | sync-metadata to evaluation context mapping function | function | identity function | in-process |
25+
| fatalStatusCodes | FLAGD_FATAL_STATUS_CODES | a list of gRPC status codes, which will cause streams to give up and put the provider in a PROVIDER_FATAL state | array | [] | rpc & in-process |
26+
"""
2627

2728
Scenario Outline: Default Config
2829
When a config was initialized
@@ -36,10 +37,11 @@ Feature: Configuration Test
3637

3738
@rpc @in-process
3839
Scenarios: Basic Connection
39-
| option | type | default |
40-
| host | String | localhost |
41-
| port | Integer | 8013 |
42-
| tls | Boolean | false |
40+
| option | type | default |
41+
| host | String | localhost |
42+
| port | Integer | 8013 |
43+
| tls | Boolean | false |
44+
| fatalStatusCodes | StringList | |
4345

4446
@rpc @in-process @targetURI
4547
Scenarios: Target URI
@@ -136,10 +138,11 @@ Feature: Configuration Test
136138

137139
@rpc @in-process
138140
Scenarios: Basic Connection
139-
| option | type | value |
140-
| host | String | local |
141-
| tls | Boolean | True |
142-
| port | Integer | 1234 |
141+
| option | type | value |
142+
| host | String | local |
143+
| tls | Boolean | True |
144+
| port | Integer | 1234 |
145+
| fatalStatusCodes | StringList | A, B |
143146

144147
@rpc @in-process @targetURI
145148
Scenarios: Target URI
@@ -203,10 +206,11 @@ Feature: Configuration Test
203206

204207
@rpc @in-process
205208
Scenarios: Basic Connection
206-
| option | env | type | value |
207-
| host | FLAGD_HOST | String | local |
208-
| tls | FLAGD_TLS | Boolean | True |
209-
| port | FLAGD_PORT | Integer | 1234 |
209+
| option | env | type | value |
210+
| host | FLAGD_HOST | String | local |
211+
| tls | FLAGD_TLS | Boolean | True |
212+
| port | FLAGD_PORT | Integer | 1234 |
213+
| fatalStatusCodes | FLAGD_FATAL_STATUS_CODES | StringList | C, D |
210214

211215
@rpc @in-process @targetURI
212216
Scenarios: Target URI
@@ -279,10 +283,11 @@ Feature: Configuration Test
279283

280284
@rpc @in-process
281285
Scenarios: Basic Connection
282-
| option | env | type | value | env-value |
283-
| host | FLAGD_HOST | String | local | l |
284-
| tls | FLAGD_TLS | Boolean | True | False |
285-
| port | FLAGD_PORT | Integer | 1234 | 3456 |
286+
| option | env | type | value | env-value |
287+
| host | FLAGD_HOST | String | local | l |
288+
| tls | FLAGD_TLS | Boolean | True | False |
289+
| port | FLAGD_PORT | Integer | 1234 | 3456 |
290+
| fatalStatusCodes | FLAGD_FATAL_STATUS_CODES | StringList | A, B | C, D |
286291

287292
@rpc @in-process @targetURI
288293
Scenarios: Target URI
@@ -327,5 +332,5 @@ Feature: Configuration Test
327332

328333
@in-process @providerId
329334
Scenarios: providerId
330-
| option | env | type | value | env-value |
331-
| providerId | FLAGD_PROVIDER_ID | String | providerId | env-prov |
335+
| option | env | type | value | env-value |
336+
| providerId | FLAGD_PROVIDER_ID | String | providerId | env-prov |

gherkin/connection.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Feature: flagd provider disconnect and reconnect functionality
5757
And a forbidden flagd provider
5858
And a error event handler
5959
Then the error event handler should have been executed within 5000ms
60-
And the client is in fatal state
60+
And the client should be in fatal state
6161

6262
@targetURI @rpc
6363
Scenario: Connection via TargetUri rpc

0 commit comments

Comments
 (0)