Skip to content

Commit 2e9f1ea

Browse files
committed
Address comments
1 parent 9fe0b4c commit 2e9f1ea

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

contributors/devel/sig-architecture/api_changes.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,10 @@ worked before the change.
323323
values of a given field will not be able to handle the new values. However, removing a
324324
value from an enumerated set *can* be a compatible change, if handled properly (treat the
325325
removed value as deprecated but allowed). For enumeration-like fields that expect to add
326-
new values in the future, such as `reason` fields, please document that expectation clearly
327-
in the API field descriptions. Clients should treat such sets of values as potentially
328-
open-ended.
326+
new values in the future, such as `reason` fields, document that expectation clearly
327+
in the API field description in the first release the field is made available,
328+
and describe how clients should treat an unknown value. Clients should treat such
329+
sets of values as potentially open-ended.
329330

330331
* For [Unions](api-conventions.md#unions), sets of fields where at most one should
331332
be set, it is acceptable to add a new option to the union if the [appropriate
@@ -1035,7 +1036,8 @@ to the following existing enum field:
10351036
type Frobber struct {
10361037
// restartPolicy may be set to "Always" or "Never".
10371038
// Additional policies may be defined in the future.
1038-
// Unrecognized policies should be treated as "Never".
1039+
// Clients should expect to handle additional values,
1040+
// and treat unrecognized values in this field as "Never".
10391041
RestartPolicy string `json:"policy"
10401042
}
10411043
```
@@ -1059,6 +1061,9 @@ Release 1:
10591061

10601062
* Only allow the new enum value when updating existing objects that already contain the new enum value
10611063
* Disallow it in other cases (creation, and update of objects that do not already contain the new enum value)
1064+
* Verify that known clients handle the new value as expected, honoring the new value or using previously defined "unknown value" behavior,
1065+
(depending on whether the associated feature gate is enabled or not)
1066+
10621067

10631068
Release 2:
10641069

@@ -1122,7 +1127,7 @@ The recommended place to do this is in the REST storage strategy's Validate/Vali
11221127
func validationOptionsForFrobber(newFrobber, oldFrobber *api.Frobber) validation.FrobberValidationOptions {
11231128
opts := validation.FrobberValidationOptions{
11241129
// allow if the feature is enabled
1125-
AllowRestartPolicyOnTuesday: utilfeature.DefaultFeatureGate.Enabled(features.Frobber2D)
1130+
AllowRestartPolicyOnTuesday: utilfeature.DefaultFeatureGate.Enabled(features.FrobberRestartPolicyOnTuesday)
11261131
}
11271132
11281133
if oldFrobber == nil {

0 commit comments

Comments
 (0)