Skip to content

Bugfix SLO API: Update type for group_by to accept either string or array-of-strings #701

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

Merged
merged 4 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Fix `elasticstack_fleet_enrollment_tokens` returning empty tokens in some case ([#683](https://github.com/elastic/terraform-provider-elasticstack/pull/683))
- Add support for Kibana synthetics private locations ([#696](https://github.com/elastic/terraform-provider-elasticstack/pull/696))
- Support setting `restriction` in `elasticstack_elasticsearch_security_api_key` role definitions ([#577](https://github.com/elastic/terraform-provider-elasticstack/pull/577))
- Fix type of `group_by` attribute in the `kibana_slo` resource to be compatible with versions 8.14+ ([#701](https://github.com/elastic/terraform-provider-elasticstack/pull/701))

## [0.11.4] - 2024-06-13

Expand Down
12 changes: 10 additions & 2 deletions generated/slo-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,11 @@ components:
example: true
groupBy:
description: optional group by field to use to generate an SLO per distinct value
type: string
oneOf:
- type: string
- type: array
items:
type: string
example: some.field
instanceId:
description: the value derived from the groupBy field, if present, otherwise '*'
Expand Down Expand Up @@ -1320,7 +1324,11 @@ components:
$ref: '#/components/schemas/settings'
groupBy:
description: optional group by field to use to generate an SLO per distinct value
type: string
oneOf:
- type: string
- type: array
items:
type: string
example: some.field
tags:
description: List of tags
Expand Down
2 changes: 2 additions & 0 deletions generated/slo/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ docs/Objective.md
docs/Settings.md
docs/SloAPI.md
docs/SloResponse.md
docs/SloResponseGroupBy.md
docs/SloResponseIndicator.md
docs/Summary.md
docs/SummaryStatus.md
Expand Down Expand Up @@ -94,6 +95,7 @@ model_indicator_properties_timeslice_metric_params_metric_metrics_inner.go
model_objective.go
model_settings.go
model_slo_response.go
model_slo_response_group_by.go
model_slo_response_indicator.go
model_summary.go
model_summary_status.go
Expand Down
1 change: 1 addition & 0 deletions generated/slo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ Class | Method | HTTP request | Description
- [Objective](docs/Objective.md)
- [Settings](docs/Settings.md)
- [SloResponse](docs/SloResponse.md)
- [SloResponseGroupBy](docs/SloResponseGroupBy.md)
- [SloResponseIndicator](docs/SloResponseIndicator.md)
- [Summary](docs/Summary.md)
- [SummaryStatus](docs/SummaryStatus.md)
Expand Down
19 changes: 11 additions & 8 deletions generated/slo/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1062,10 +1062,7 @@ components:
example: true
type: boolean
groupBy:
description: optional group by field to use to generate an SLO per distinct
value
example: some.field
type: string
$ref: '#/components/schemas/slo_response_groupBy'
instanceId:
description: "the value derived from the groupBy field, if present, otherwise\
\ '*'"
Expand Down Expand Up @@ -1289,10 +1286,7 @@ components:
settings:
$ref: '#/components/schemas/settings'
groupBy:
description: optional group by field to use to generate an SLO per distinct
value
example: some.field
type: string
$ref: '#/components/schemas/slo_response_groupBy'
tags:
description: List of tags
items:
Expand Down Expand Up @@ -1783,6 +1777,15 @@ components:
- $ref: '#/components/schemas/indicator_properties_custom_metric'
- $ref: '#/components/schemas/indicator_properties_histogram'
- $ref: '#/components/schemas/indicator_properties_timeslice_metric'
slo_response_groupBy:
description: optional group by field to use to generate an SLO per distinct
value
example: some.field
oneOf:
- type: string
- items:
type: string
type: array
create_slo_request_indicator:
oneOf:
- $ref: '#/components/schemas/indicator_properties_custom_kql'
Expand Down
8 changes: 4 additions & 4 deletions generated/slo/docs/CreateSloRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Name | Type | Description | Notes
**BudgetingMethod** | [**BudgetingMethod**](BudgetingMethod.md) | |
**Objective** | [**Objective**](Objective.md) | |
**Settings** | Pointer to [**Settings**](Settings.md) | | [optional]
**GroupBy** | Pointer to **string** | optional group by field to use to generate an SLO per distinct value | [optional]
**GroupBy** | Pointer to [**SloResponseGroupBy**](SloResponseGroupBy.md) | | [optional]
**Tags** | Pointer to **[]string** | List of tags | [optional]

## Methods
Expand Down Expand Up @@ -206,20 +206,20 @@ HasSettings returns a boolean if a field has been set.

### GetGroupBy

`func (o *CreateSloRequest) GetGroupBy() string`
`func (o *CreateSloRequest) GetGroupBy() SloResponseGroupBy`

GetGroupBy returns the GroupBy field if non-nil, zero value otherwise.

### GetGroupByOk

`func (o *CreateSloRequest) GetGroupByOk() (*string, bool)`
`func (o *CreateSloRequest) GetGroupByOk() (*SloResponseGroupBy, bool)`

GetGroupByOk returns a tuple with the GroupBy field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetGroupBy

`func (o *CreateSloRequest) SetGroupBy(v string)`
`func (o *CreateSloRequest) SetGroupBy(v SloResponseGroupBy)`

SetGroupBy sets GroupBy field to given value.

Expand Down
10 changes: 5 additions & 5 deletions generated/slo/docs/SloResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Name | Type | Description | Notes
**Revision** | **float64** | The SLO revision |
**Summary** | [**Summary**](Summary.md) | |
**Enabled** | **bool** | Indicate if the SLO is enabled |
**GroupBy** | **string** | optional group by field to use to generate an SLO per distinct value |
**GroupBy** | [**SloResponseGroupBy**](SloResponseGroupBy.md) | |
**InstanceId** | **string** | the value derived from the groupBy field, if present, otherwise '*' |
**Tags** | **[]string** | List of tags |
**CreatedAt** | **string** | The creation date |
Expand All @@ -25,7 +25,7 @@ Name | Type | Description | Notes

### NewSloResponse

`func NewSloResponse(id string, name string, description string, indicator SloResponseIndicator, timeWindow TimeWindow, budgetingMethod BudgetingMethod, objective Objective, settings Settings, revision float64, summary Summary, enabled bool, groupBy string, instanceId string, tags []string, createdAt string, updatedAt string, ) *SloResponse`
`func NewSloResponse(id string, name string, description string, indicator SloResponseIndicator, timeWindow TimeWindow, budgetingMethod BudgetingMethod, objective Objective, settings Settings, revision float64, summary Summary, enabled bool, groupBy SloResponseGroupBy, instanceId string, tags []string, createdAt string, updatedAt string, ) *SloResponse`

NewSloResponse instantiates a new SloResponse object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -262,20 +262,20 @@ SetEnabled sets Enabled field to given value.

### GetGroupBy

`func (o *SloResponse) GetGroupBy() string`
`func (o *SloResponse) GetGroupBy() SloResponseGroupBy`

GetGroupBy returns the GroupBy field if non-nil, zero value otherwise.

### GetGroupByOk

`func (o *SloResponse) GetGroupByOk() (*string, bool)`
`func (o *SloResponse) GetGroupByOk() (*SloResponseGroupBy, bool)`

GetGroupByOk returns a tuple with the GroupBy field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetGroupBy

`func (o *SloResponse) SetGroupBy(v string)`
`func (o *SloResponse) SetGroupBy(v SloResponseGroupBy)`

SetGroupBy sets GroupBy field to given value.

Expand Down
30 changes: 30 additions & 0 deletions generated/slo/docs/SloResponseGroupBy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# SloResponseGroupBy

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

## Methods

### NewSloResponseGroupBy

`func NewSloResponseGroupBy() *SloResponseGroupBy`

NewSloResponseGroupBy instantiates a new SloResponseGroupBy object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed

### NewSloResponseGroupByWithDefaults

`func NewSloResponseGroupByWithDefaults() *SloResponseGroupBy`

NewSloResponseGroupByWithDefaults instantiates a new SloResponseGroupBy object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set


[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


13 changes: 6 additions & 7 deletions generated/slo/model_create_slo_request.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions generated/slo/model_slo_response.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading