Repository navigation
Commit 47a8b8a
fix(flagd): use FLAGD_SYNC_PORT for in-process provider with backwards compatibility (#345)
* fix(flagd): use FLAGD_SYNC_PORT for in-process provider with backwards compatibility
- Add ENV_VAR_SYNC_PORT constant for FLAGD_SYNC_PORT
- Update port resolution: FLAGD_SYNC_PORT → FLAGD_PORT → default for in-process mode
- Keep RPC mode using FLAGD_PORT only
- Add 5 new tests covering sync port usage, fallback, priority, and RPC isolation
- Update README documentation to reflect new environment variable
Fixes #318
Signed-off-by: Mridul Tailor <mtailor729@gmail.com>
* Update providers/openfeature-provider-flagd/README.md
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Mridul Tailor <71081929+MridulTailor@users.noreply.github.com>
* fix(flagd): simplify in-process port resolution logic
Refactor port env var resolution for in-process mode to use os.environ.get() chaining instead of nested if/else, as suggested in code review. Logic and behavior are unchanged.
Signed-off-by: Mridul Tailor <mtailor729@gmail.com>
* fix(flagd): fix FILE resolver port regression and simplify logic
FILE resolver was incorrectly defaulting to RPC port (8013) instead
of in-process port (8015). Simplify port resolution using env_or_default
helper to handle RPC, IN_PROCESS, and FILE resolver types correctly.
Signed-off-by: Mridul Tailor <mtailor729@gmail.com>
* fix(flagd): only apply FLAGD_SYNC_PORT env var for in-process resolver
Signed-off-by: Mridul Tailor <mtailor729@gmail.com>
* simplify conditions
Signed-off-by: gruebel <anton.gruebel@gmail.com>
---------
Signed-off-by: Mridul Tailor <mtailor729@gmail.com>
Signed-off-by: Mridul Tailor <71081929+MridulTailor@users.noreply.github.com>
Signed-off-by: gruebel <anton.gruebel@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gruebel <anton.gruebel@gmail.com>1 parent a7cc860 commit 47a8b8a
3 files changed
Lines changed: 71 additions & 21 deletions
File tree
- providers/openfeature-provider-flagd
- src/openfeature/contrib/provider/flagd
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
188 | 184 | | |
189 | 185 | | |
190 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
0 commit comments