Skip to content

Commit

Permalink
Merge branch 'main' into PC-14075-add-field
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-zelazny authored Oct 17, 2024
2 parents a0b24fb + 24782da commit 7462c3f
Show file tree
Hide file tree
Showing 9 changed files with 460 additions and 213 deletions.
25 changes: 21 additions & 4 deletions manifest/v1alpha/slo/slo.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,32 @@ type AnomalyConfigAlertMethod struct {
// Status holds dynamic fields returned when the Service is fetched from Nobl9 platform.
// Status is not part of the static object definition.
type Status struct {
UpdatedAt string `json:"updatedAt,omitempty"`
ReplayStatus *ReplayStatus `json:"timeTravel,omitempty"`
TargetSLOStatus *TargetSloStatus `json:"targetSlo,omitempty"`
UpdatedAt string `json:"updatedAt,omitempty"`
CompositeSLO *ProcessStatus `json:"compositeSlo,omitempty"`
ErrorBudgetAdjustment *ProcessStatus `json:"errorBudgetAdjustment,omitempty"`
Replay *ProcessStatus `json:"replay,omitempty"`
TargetSLO *TargetSloStatus `json:"targetSlo,omitempty"`
// Deprecated: use Status.Replay instead.
ReplayStatus *ReplayStatus `json:"timeTravel,omitempty"`
}

type ProcessStatus struct {
Status string `json:"status"`
TriggeredBy string `json:"triggeredBy"`
Unit string `json:"unit"`
Value int `json:"value"`
StartTime string `json:"startTime"`
}

// TargetSloStatus represents the status of Replay a target SLO process.
type TargetSloStatus struct {
TargetTimeTravel ReplayStatus `json:"targetTimeTravel"`
// Deprecated: use TargetSloStatus.Replay instead.
TargetTimeTravel ReplayStatus `json:"targetTimeTravel,omitempty"`
Replay ProcessStatus `json:"replay,omitempty"`
}

// Deprecated: ReplayStatus exists for historical compatibility
// and should not be used.
type ReplayStatus struct {
Source string `json:"source"`
Status string `json:"status"`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"type": "module",
"devDependencies": {
"cspell": "8.15.1",
"cspell": "8.15.3",
"markdownlint-cli": "0.41.0",
"yaml": "2.6.0"
},
Expand Down
1 change: 0 additions & 1 deletion sdk/api_error.tmpl

This file was deleted.

80 changes: 0 additions & 80 deletions sdk/client_errors.go

This file was deleted.

127 changes: 0 additions & 127 deletions sdk/client_errors_test.go

This file was deleted.

8 changes: 8 additions & 0 deletions sdk/http_error.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{- if and (len .Errors | eq 1) (not (index .Errors 0).Source) }}
{{- if .CodeText }}{{ .CodeText }}: {{ end -}}{{ (index .Errors 0).Title }} (code: {{ .Code }}{{- if .URL }}, endpoint: {{ .Method }} {{ .URL }}{{- end }}{{- if .TraceID }}, traceId: {{ .TraceID }}{{- end }})
{{- else }}
{{- if .CodeText }}{{ .CodeText }} {{ end -}} (code: {{ .Code }}{{- if .URL }}, endpoint: {{ .Method }} {{ .URL }}{{- end }}{{- if .TraceID }}, traceId: {{ .TraceID }}{{- end }})
{{- range .Errors }}
- {{ .Title }}{{- if .Source }} (source: '{{ .Source.PropertyName }}'{{- if .Source.PropertyValue }}, value: '{{ .Source.PropertyValue }}'{{- end }}){{- end }}
{{- end }}
{{- end }}
Loading

0 comments on commit 7462c3f

Please sign in to comment.