Skip to content

Commit cc69f36

Browse files
committed
address pr feedback
Signed-off-by: Michael Beemer <[email protected]>
1 parent 8c12900 commit cc69f36

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

docs/architecture-decisions/support-code-default.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,11 @@ A single flag evaluation returns a `200` status code:
193193
- Good, because it treats code default usage as successful evaluation with proper telemetry
194194
- Good, because telemetry can distinguish between configured defaults (variant present) and code defaults (variant absent)
195195
- 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
197197
- Bad, because it requires protobuf schema changes to use `optional` fields
198198
- Bad, because it requires updates across multiple components (flagd, providers, testbed)
199199
- 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)
200201
- Bad, because providers must be updated to handle field presence detection
201202
- Neutral, because existing configurations continue to work unchanged
202203

@@ -208,10 +209,11 @@ A single flag evaluation returns a `200` status code:
208209
4. Implement core logic in flagd to handle null defaults by conditionally omitting fields in responses
209210
5. Update OpenFeature providers to check field presence rather than just reading field values
210211
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
215217

216218
### Testing Considerations
217219

@@ -234,6 +236,8 @@ To ensure correct implementation across all components:
234236
- Yes, we'll support both `null` and absent fields to maximize flexibility. An absent `defaultVariant` will be the equivalent of `null`.
235237
- What migration path should we recommend for users currently using workarounds?
236238
- 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.
237241
- Should this feature be gated behind a configuration flag during initial rollout?
238242
- We'll avoid public facing documentation until the feature is fully implemented and tested.
239243
- How do we ensure consistent behavior across all provider implementations?

0 commit comments

Comments
 (0)