Commit 9ad25a4
feat(flagd): Implement dual-mode selector handling (header and body) for in-process mode in python-sdk-contrib (#320)
* Initial plan
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
* Document selector migration guidance for in-process mode
- Add comprehensive migration guidance section for selector handling
- Clarify that selector changes only affect in-process and file modes
- Document backward compatibility and future breaking changes
- Update provider docstring with selector migration note
- Link to upstream flagd issue #1814
Co-authored-by: aepfli <9987394+aepfli@users.noreply.github.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
* Implement selector passing via gRPC metadata header for in-process mode
- Update GrpcWatcher to pass selector via flagd-selector metadata header
- Add GrpcMultiCallableArgs.metadata field to support gRPC metadata
- Update README to reflect current header-based implementation
- Add test to verify selector is passed via metadata, not request body
- Aligns with flagd v0.11.0+ selector normalization standard
Co-authored-by: aepfli <9987394+aepfli@users.noreply.github.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
* Pass selector via both header and request body for backward compatibility
- Update _create_request_args to include selector in request body
- Maintain selector in flagd-selector gRPC metadata header
- Update test to verify both header and body contain selector
- Update documentation to reflect dual transmission approach
- Ensures compatibility with both older and newer flagd versions
Co-authored-by: aepfli <9987394+aepfli@users.noreply.github.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
* Update providers/openfeature-provider-flagd/tests/test_grpc_watcher.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
* fixup: linting
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
* fixup: types
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
* fixup: linting
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
* fixup: more formating
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
* fixup: changing assertion
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
* fixup: changing assertion
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.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: Simon Schrottner <simon.schrottner@dynatrace.com>
* Update providers/openfeature-provider-flagd/src/openfeature/contrib/provider/flagd/resolvers/process/connector/grpc_watcher.py
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
---------
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aepfli <9987394+aepfli@users.noreply.github.com>
Co-authored-by: Simon Schrottner <simon.schrottner@dynatrace.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 parent 7b83b94 commit 9ad25a4
File tree
5 files changed
+98
-4
lines changed- providers/openfeature-provider-flagd
- src/openfeature/contrib/provider/flagd
- resolvers
- process/connector
- tests
5 files changed
+98
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
106 | 145 | | |
107 | 146 | | |
108 | 147 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| |||
Lines changed: 27 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| 208 | + | |
| 209 | + | |
208 | 210 | | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
212 | 214 | | |
213 | 215 | | |
214 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
215 | 229 | | |
216 | 230 | | |
217 | 231 | | |
| |||
229 | 243 | | |
230 | 244 | | |
231 | 245 | | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
236 | 249 | | |
237 | 250 | | |
238 | 251 | | |
| |||
279 | 292 | | |
280 | 293 | | |
281 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
0 commit comments