Skip to content

Commit

Permalink
Revert "feat: PC-13893 Deprecate usage of objective's value field for…
Browse files Browse the repository at this point in the history
… Composite SLOs (#529)"

This reverts commit 0350ad4.
  • Loading branch information
ditrytus committed Sep 20, 2024
1 parent afe5f88 commit 5aa05ba
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/manifest/v1alpha/examples/slo_composite.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func (s sloCompositeExample) SLO() v1alphaSLO.SLO {
{
ObjectiveBase: v1alphaSLO.ObjectiveBase{
DisplayName: "User experience",
Value: ptr(0.0),
Name: "user-experience",
},
BudgetTarget: ptr(0.95),
Expand Down
4 changes: 4 additions & 0 deletions manifest/v1alpha/slo/examples/composite-slo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
budgetingMethod: Occurrences
objectives:
- displayName: User experience
value: 0.0
name: user-experience
target: 0.95
composite:
Expand Down Expand Up @@ -95,6 +96,7 @@
budgetingMethod: Occurrences
objectives:
- displayName: User experience
value: 0.0
name: user-experience
target: 0.95
composite:
Expand Down Expand Up @@ -158,6 +160,7 @@
budgetingMethod: Timeslices
objectives:
- displayName: User experience
value: 0.0
name: user-experience
target: 0.95
timeSliceTarget: 0.9
Expand Down Expand Up @@ -225,6 +228,7 @@
budgetingMethod: Timeslices
objectives:
- displayName: User experience
value: 0.0
name: user-experience
target: 0.95
timeSliceTarget: 0.9
Expand Down
2 changes: 1 addition & 1 deletion manifest/v1alpha/slo/slo.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ type Attachment struct {
// ObjectiveBase base structure representing an objective.
type ObjectiveBase struct {
DisplayName string `json:"displayName"`
Value *float64 `json:"value,omitempty"`
Value *float64 `json:"value"`
Name string `json:"name"`
NameChanged bool `json:"-"`
}
Expand Down
1 change: 1 addition & 0 deletions sdk/test_data/reader/expected/composite_v2_slo.tpl.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"objectives": [
{
"displayName": "composite-obj",
"value": null,
"name": "composite-obj",
"target": 0.99,
"composite": {
Expand Down

0 comments on commit 5aa05ba

Please sign in to comment.