You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> The `selector` configuration is only used in **in-process** mode for filtering flag configurations. See [Selector Handling](#selector-handling-in-process-mode-only) for migration guidance.
98
+
96
99
<!-- not implemented
97
100
| target_uri | FLAGD_TARGET_URI | alternative to host/port, supporting custom name resolution | string | null | rpc & in-process |
98
101
| socket_path | FLAGD_SOCKET_PATH | alternative to host port, unix socket | String | null | rpc & in-process |
@@ -103,6 +106,47 @@ The default options can be defined in the FlagdProvider constructor.
103
106
> [!NOTE]
104
107
> Some configurations are only applicable for RPC resolver.
105
108
109
+
### Selector Handling (In-Process Mode Only)
110
+
111
+
> [!IMPORTANT]
112
+
> This section only applies to **in-process** and **file** resolver modes. RPC mode is not affected by selector handling changes.
113
+
114
+
#### Migration Guidance
115
+
116
+
As of flagd v0.11.0 and related services, selector normalization has been updated to prefer gRPC metadata headers over request body fields for the `selector` parameter. This change affects how the in-process provider communicates with flagd's sync service.
117
+
118
+
**Current Behavior (Preferred):**
119
+
The Python SDK currently passes the `selector` via the gRPC request body when using in-process mode. While this approach continues to work for backward compatibility, the flagd ecosystem is transitioning to header-based selector passing.
120
+
121
+
**Configuration Example:**
122
+
```python
123
+
from openfeature import api
124
+
from openfeature.contrib.provider.flagd import FlagdProvider
125
+
from openfeature.contrib.provider.flagd.config import ResolverType
126
+
127
+
api.set_provider(FlagdProvider(
128
+
resolver_type=ResolverType.IN_PROCESS,
129
+
selector="my-flag-source", # Currently passed in request body
130
+
))
131
+
```
132
+
133
+
#### Backward Compatibility
134
+
135
+
The current implementation maintains backward compatibility by continuing to pass selectors in the request body. flagd services support both approaches:
136
+
-**Request body selector** (current implementation) - Supported for backward compatibility
137
+
-**Header-based selector** (future preferred) - Will be supported in a future SDK update
138
+
139
+
#### Future Breaking Change
140
+
141
+
In a future major version of this SDK, the selector handling will be updated to use gRPC metadata headers (`flagd-selector`) instead of the request body field. This aligns with the flagd ecosystem's standardized approach to selector normalization.
142
+
143
+
**Action Required:**
144
+
No immediate action is required. The current implementation will continue to work with both current and future versions of flagd services. Monitor release notes for announcements about the transition to header-based selectors.
0 commit comments