feat: PC-13893 Deprecate usage of objective's value field for Composite SLOs #549
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Currently, we have
value
field required for all objectives in an SLO. We currently allow to not pass that field in YAML at all but it causes it to default to 0 anyway and is returnedvalue: 0
. This is inconsistent because GET yaml is different than APPLY YAML in such case.Composite SLOs always have exactly one objective, so as such
value
doesn’t matter for them at all as long as it doesn't change.Moreover, the existence of value is documented and used in examples which is confusing to new adopters of Composite SLOs because it is required, changing it will restart budget, but it doesn’t do anything.
We want to encourage and allow not setting
value
field for Composite SLOs while maintaining backward compatibility with users who perhaps already explicitly set it.Summary
value
will be omitted if it isnull
in API.value
field is omitted in all Composite SLO examples and E2E tests.Related changes
#551
#549
https://github.com/nobl9/n9/pull/15406
nobl9/terraform-provider-nobl9#312
nobl9/terraform-provider-nobl9#295
Testing
Release Notes
Usage of
spec.objective[0].value
field for Composite SLOs becomes deprecated.value
field.value: 0
for backward compatibility with older versions of Nobl9 SDK and Nobl9 Terrafrom Provider.value
was previously set to0
for Composite SLO then it should be omitted going forward.value
was previously set in Composite SLO to a number other than0
then it can no longer be updated but still will be accepted for backward compatibility.The usage of
value
for SLOs using ratio or threshold SLIs does not change.