Skip to content

Commit 4474a4d

Browse files
authored
Merge pull request #378 from flipt-io/claude/issue-373-20251030-1333
docs: add fetch_policy configuration option for git storage
2 parents 22d67a5 + 980f2f3 commit 4474a4d

File tree

5 files changed

+57
-134
lines changed

5 files changed

+57
-134
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@ jobs:
2121

2222
- name: Check for Broken Links
2323
run: npx -y mint broken-links
24-

.github/workflows/worker.yml

Lines changed: 0 additions & 95 deletions
This file was deleted.

docs.json

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@
3737
"group": "Pro Features",
3838
"tag": "NEW",
3939
"icon": "crown",
40-
"pages": [
41-
"v2/pro",
42-
"v2/licensing"
43-
]
40+
"pages": ["v2/pro", "v2/licensing"]
4441
},
4542
{
4643
"group": "Configuration",
@@ -66,9 +63,7 @@
6663
"v2/integration/overview",
6764
{
6865
"group": "Server-Side SDKs",
69-
"pages": [
70-
"v2/integration/server/rest"
71-
]
66+
"pages": ["v2/integration/server/rest"]
7267
},
7368
"v2/integration/client",
7469
"v2/integration/openfeature"
@@ -143,19 +138,15 @@
143138
},
144139
{
145140
"group": "Migration Guides",
146-
"pages": [
147-
"v2/guides/migration/cloud/flipt-cloud-to-v2"
148-
]
141+
"pages": ["v2/guides/migration/cloud/flipt-cloud-to-v2"]
149142
}
150143
]
151144
},
152145
{
153146
"group": "Tooling",
154147
"icon": "hammer",
155148
"tag": "NEW",
156-
"pages": [
157-
"v2/tooling/github-actions"
158-
]
149+
"pages": ["v2/tooling/github-actions"]
159150
}
160151
]
161152
},
@@ -185,10 +176,7 @@
185176
"groups": [
186177
{
187178
"group": "Overview",
188-
"pages": [
189-
"v1/introduction",
190-
"v1/concepts"
191-
]
179+
"pages": ["v1/introduction", "v1/concepts"]
192180
},
193181
{
194182
"group": "Use Cases",
@@ -333,9 +321,7 @@
333321
},
334322
{
335323
"group": "Authorization",
336-
"pages": [
337-
"v1/authorization/overview"
338-
]
324+
"pages": ["v1/authorization/overview"]
339325
},
340326
{
341327
"group": "Operations",
@@ -362,9 +348,7 @@
362348
"groups": [
363349
{
364350
"group": "Overview",
365-
"pages": [
366-
"v1/reference/overview"
367-
]
351+
"pages": ["v1/reference/overview"]
368352
},
369353
{
370354
"group": "Authentication",
@@ -475,9 +459,7 @@
475459
{
476460
"anchor": "Changelog",
477461
"icon": "clock",
478-
"pages": [
479-
"v1/changelog/overview"
480-
]
462+
"pages": ["v1/changelog/overview"]
481463
},
482464
{
483465
"anchor": "Blog",

docs/v2/configuration/overview.mdx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -181,18 +181,19 @@ Server configuration controls how Flipt listens for and serves HTTP, HTTPS, and
181181

182182
Storage configuration defines where and how Flipt persists feature flag data, including local and remote Git repositories.
183183

184-
| Property | Description | Default | Since |
185-
| ------------------------------ | ------------------------------------------------------------------- | ------------------- | ------ |
186-
| storage.[id].name | The canonical name of the storage instance | default | v2.0.0 |
187-
| storage.[id].backend.type | The type of backend to use (options: memory, local) | memory | v2.0.0 |
188-
| storage.[id].backend.path | The path to the local storage directory for git backend | temporary directory | v2.0.0 |
189-
| storage.[id].remote | The remote URL to sync storage to/from | | v2.0.0 |
190-
| storage.[id].branch | The branch to use for git backend | main | v2.0.0 |
191-
| storage.[id].poll_interval | The interval to poll the git repository and ref for changes | 30s | v2.0.0 |
192-
| storage.[id].ca_cert_bytes | The CA certificate bytes for the remote URL | | v2.0.0 |
193-
| storage.[id].ca_cert_path | The CA certificate path for the remote URL | | v2.0.0 |
194-
| storage.[id].insecure_skip_tls | Skip verifying the server's certificate chain (avoid in production) | false | v2.0.0 |
195-
| storage.[id].credentials | The id of the credentials to use for the remote URL | | v2.0.0 |
184+
| Property | Description | Default | Since |
185+
| ------------------------------ | ------------------------------------------------------------------------------------- | ------------------- | ------ |
186+
| storage.[id].name | The canonical name of the storage instance | default | v2.0.0 |
187+
| storage.[id].backend.type | The type of backend to use (options: memory, local) | memory | v2.0.0 |
188+
| storage.[id].backend.path | The path to the local storage directory for git backend | temporary directory | v2.0.0 |
189+
| storage.[id].remote | The remote URL to sync storage to/from | | v2.0.0 |
190+
| storage.[id].branch | The branch to use for git backend | main | v2.0.0 |
191+
| storage.[id].poll_interval | The interval to poll the git repository and ref for changes | 30s | v2.0.0 |
192+
| storage.[id].ca_cert_bytes | The CA certificate bytes for the remote URL | | v2.0.0 |
193+
| storage.[id].ca_cert_path | The CA certificate path for the remote URL | | v2.0.0 |
194+
| storage.[id].insecure_skip_tls | Skip verifying the server's certificate chain (avoid in production) | false | v2.0.0 |
195+
| storage.[id].fetch_policy | Policy for handling connection issues when fetching from remote Git (strict, lenient) | strict | v2.3.0 |
196+
| storage.[id].credentials | The id of the credentials to use for the remote URL | | v2.0.0 |
196197

197198
#### Commit Signing
198199

docs/v2/configuration/storage.mdx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,49 @@ storage:
7979
remote: "https://github.com/flipt-io/example.git"
8080
branch: "main"
8181
poll_interval: "30s"
82+
fetch_policy: "strict"
8283
credentials: "github"
8384
backend:
8485
type: memory
8586
```
8687

8788
This configuration will create a git storage backend with the identifier `staging` in memory and will sync flag state to and from the remote repository.
8889

90+
### Fetch Policy
91+
92+
The `fetch_policy` configuration option controls how Flipt handles connection-related issues when attempting to fetch from a remote Git repository.
93+
94+
#### Available Policies
95+
96+
- **`strict`** (default): Flipt will fail and return an error if it encounters connection issues when trying to fetch from the remote repository. This ensures that any connectivity problems are immediately visible and must be resolved.
97+
98+
- **`lenient`**: Flipt will continue operating even if connection issues prevent fetching from the remote repository. This allows Flipt to remain functional during temporary network issues or remote repository unavailability.
99+
100+
#### Usage Example
101+
102+
```yaml
103+
storage:
104+
production:
105+
remote: "https://github.com/company/flags.git"
106+
fetch_policy: "strict" # Fail fast on connection issues
107+
backend:
108+
type: local
109+
path: "/var/lib/flipt"
110+
111+
development:
112+
remote: "https://github.com/company/flags.git"
113+
fetch_policy: "lenient" # Continue operation during connection issues
114+
backend:
115+
type: memory
116+
```
117+
118+
<Warning>
119+
In production environments, consider using `strict` to ensure that
120+
connectivity issues are detected and resolved promptly, preventing potential
121+
configuration drift between your remote repository and running Flipt
122+
instances.
123+
</Warning>
124+
89125
### Conflict Resolution
90126

91127
Conflicts can occur when syncing flag state to and from a remote repository. The conflict resolution strategy in Flipt v2 is currently rudimentary and we aim to improve this in future releases.

0 commit comments

Comments
 (0)