Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SLO support to provider #385

Merged
merged 47 commits into from
Aug 16, 2023
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
05cba56
add generated client and temporary spec file
wandergeek Jul 14, 2023
1a90362
add docs and examples
wandergeek Jul 14, 2023
834d5b8
Add SLO support
wandergeek Jul 14, 2023
b39cb3b
Tweak generator make target
wandergeek Jul 14, 2023
0decee0
appease linters
wandergeek Jul 14, 2023
a19f31c
generate docs
wandergeek Jul 14, 2023
819c84b
remove cursing from source file :'(
wandergeek Jul 14, 2023
2e7a8dc
Update internal/clients/kibana/slo_test.go
wandergeek Jul 14, 2023
143897a
Update to latest spec
wandergeek Aug 7, 2023
022dde8
Create auth context for each generated client
wandergeek Aug 7, 2023
f5e7c06
Fix up error handling in slo kibana client
wandergeek Aug 7, 2023
97ec307
Use budgetingmethod type and add groupby to model
wandergeek Aug 7, 2023
2ff23e6
Fix switch type linting error
wandergeek Aug 7, 2023
9b52da3
Add min/max to appropriate fields in the schema
wandergeek Aug 7, 2023
218bcb2
Use slice literals where possible
wandergeek Aug 7, 2023
2e3a781
Use proper composite ID for resources
wandergeek Aug 7, 2023
3ecf293
Make settings nullable
wandergeek Aug 7, 2023
062ecfb
Add groupby
wandergeek Aug 7, 2023
d436121
Fix up budgetingMethod getter/setter
wandergeek Aug 7, 2023
4935bef
Fix up indicator getter/setter and add new indicator types
wandergeek Aug 7, 2023
e031ee6
Add additional tests for new indicators and optional settings
wandergeek Aug 7, 2023
2c06135
Merge remote-tracking branch 'origin/O11Y-236-add-slo-pr-2' into O11Y…
wandergeek Aug 7, 2023
811c59f
Recreate resources if they don't exist
wandergeek Aug 8, 2023
377a160
Force slo response to have all fields
wandergeek Aug 8, 2023
562a239
Handle computed settings stanza from API
wandergeek Aug 8, 2023
c97c4cf
Make custom indicator types unsupported for now
wandergeek Aug 8, 2023
1410574
Add more tests for computed settings
wandergeek Aug 8, 2023
3722452
regen docs
wandergeek Aug 8, 2023
a0cce18
remove comment
wandergeek Aug 8, 2023
f66bd22
remove another comment
wandergeek Aug 8, 2023
dccb2f4
upgrade stack version to 8.9.0
wandergeek Aug 8, 2023
45030d2
upgrade stack to 8.9.0 and quietly remove any dangling container name…
wandergeek Aug 9, 2023
59e6500
fix copy pasta error in api client auth
wandergeek Aug 9, 2023
827303a
Merge branch 'main' into O11Y-236-add-slo-pr-2
wandergeek Aug 9, 2023
f6fd73c
Use kibana spec from kibana repo rather than static file
wandergeek Aug 11, 2023
c51850f
add success test with proper data
wandergeek Aug 11, 2023
f643ace
use switch instead of if statements for resourceRead
wandergeek Aug 11, 2023
2d4e55b
Use scoped functions for tests
wandergeek Aug 11, 2023
22a3115
Merge remote-tracking branch 'origin/O11Y-236-add-slo-pr-2' into O11Y…
wandergeek Aug 11, 2023
246d471
temporarily hack spec file and regen to work around bug in API
wandergeek Aug 14, 2023
f2d71cf
add new indicator types, split indicators into own objects
wandergeek Aug 14, 2023
39dddf6
generate docs
wandergeek Aug 14, 2023
cf8c760
add some tests for config failures
wandergeek Aug 15, 2023
b3a45b1
Add docs for all indicator types
wandergeek Aug 15, 2023
04d257c
prevent a nil deref when client gets a nil response from an unavailab…
wandergeek Aug 15, 2023
4079d5a
Merge branch 'main' into O11Y-236-add-slo-pr-2
wandergeek Aug 15, 2023
88ff081
Update internal/clients/kibana/slo.go
wandergeek Aug 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/clients/kibana/slo.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ func GetSlo(ctx context.Context, apiClient *clients.ApiClient, id, spaceID strin
ctxWithAuth := apiClient.SetSloAuthContext(ctx)
req := client.GetSloOp(ctxWithAuth, "default", id).KbnXsrf("true")
sloRes, res, err := req.Execute()
if err != nil && res == nil {
wandergeek marked this conversation as resolved.
Show resolved Hide resolved
return nil, diag.FromErr(err)
}
if res.StatusCode == http.StatusNotFound {
return nil, nil
}
Expand Down