elastic / cloud-sdk-go

Apache License 2.0
21 stars 46 forks source link

Add ValidateOnly params for deployment update API #458

Closed kotaroooo0 closed 8 months ago

kotaroooo0 commented 8 months ago

Description

cloud-sdk-go do not use validate_only parameter for deployment update api, althouth ElasticCloud's REST API uses it. So, this pull request addressed this issue. reference: https://www.elastic.co/guide/en/cloud-enterprise/current/update-deployment.html#ece_query_parameters_13

Related Issues

https://github.com/elastic/cloud-sdk-go/issues/459

Motivation and Context

cloud-sdk-go do not use validate_only parameter for deployment update api, althouth ElasticCloud's REST API uses it.

How Has This Been Tested?

go 1.21.7 Apple M3 Pro 14.2.1 Local Go script

With ValidateOnly = true parameter, rolling update is not started.

replace package: https://github.com/kotaroooo0/poc-validate-only/blob/main/go.mod#L7 give ValidateOnly parameter: https://github.com/kotaroooo0/poc-validate-only/blob/main/main.go#L25

Types of Changes

Readiness Checklist

tobio commented 8 months ago

@kotaroooo0 are you able to amend the commit here so it's signed?

kotaroooo0 commented 8 months ago

@tobio is this ok?

tobio commented 8 months ago

Looks great, thanks for following up :)