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
Copy file name to clipboardExpand all lines: docs/architecture-decisions/support-code-default.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -193,10 +193,11 @@ A single flag evaluation returns a `200` status code:
193
193
- Good, because it treats code default usage as successful evaluation with proper telemetry
194
194
- Good, because telemetry can distinguish between configured defaults (variant present) and code defaults (variant absent)
195
195
- Good, because it uses a simple field presence pattern that works across all protocols
196
-
- Good, because it maintains full backward compatibility
196
+
- Good, because it maintains backward compatibility for existing flag configurations
197
197
- Bad, because it requires protobuf schema changes to use `optional` fields
198
198
- Bad, because it requires updates across multiple components (flagd, providers, testbed)
199
199
- Bad, because it introduces a new concept that users need to understand
200
+
- Bad, because it creates a breaking change for older clients evaluating flags configured with `defaultVariant: null` (they would receive zero values instead of using code defaults)
200
201
- Bad, because providers must be updated to handle field presence detection
201
202
- Neutral, because existing configurations continue to work unchanged
202
203
@@ -208,10 +209,11 @@ A single flag evaluation returns a `200` status code:
208
209
4. Implement core logic in flagd to handle null defaults by conditionally omitting fields in responses
209
210
5. Update OpenFeature providers to check field presence rather than just reading field values
210
211
6. Regenerate protobuf client libraries for all supported languages with new optional field support
211
-
7. Update provider documentation with field presence detection patterns for each language
212
-
8. Add backward compatibility testing to ensure existing clients continue to work
213
-
9. Update CI/CD pipelines to validate protobuf schema changes and field presence behavior
214
-
10. Documentation updates, migration guides, and playground examples to demonstrate the new configuration options
212
+
7. Release updated clients before configuring any flags with `defaultVariant: null` to avoid zero-value issues with older clients
213
+
8. Update provider documentation with field presence detection patterns for each language
214
+
9. Add backward compatibility testing to ensure existing clients continue to work
215
+
10. Update CI/CD pipelines to validate protobuf schema changes and field presence behavior
216
+
11. Documentation updates, migration guides, and playground examples to demonstrate the new configuration options
215
217
216
218
### Testing Considerations
217
219
@@ -234,6 +236,8 @@ To ensure correct implementation across all components:
234
236
- Yes, we'll support both `null` and absent fields to maximize flexibility. An absent `defaultVariant` will be the equivalent of `null`.
235
237
- What migration path should we recommend for users currently using workarounds?
236
238
- Update the flag configurations to use `defaultVariant: null` and remove any misconfigured rulesets that force code defaults.
239
+
- How should we handle the breaking change for older clients evaluating `defaultVariant: null` flags?
240
+
- Older clients built without optional protobuf fields will receive zero values (false, 0, "") instead of using code defaults. This requires coordinated rollout: (1) Update and deploy all clients with new protobuf definitions, (2) Only then configure flags with `defaultVariant: null`. Alternatively, maintain separate flag configurations during transition period.
237
241
- Should this feature be gated behind a configuration flag during initial rollout?
238
242
- We'll avoid public facing documentation until the feature is fully implemented and tested.
239
243
- How do we ensure consistent behavior across all provider implementations?
0 commit comments