Bot releases are visible (Hide)
Published by marclop over 3 years ago
pkg/logging
package and sub-packagesRemoves the unused pkg/logging
package and sub-packages.
pkg/api/commentapi
packageThis new API allows consumers to CRUD comments on various Elastic Cloud platform resources.
pkg/api/deploymentapi/extensionapi.Upload
functionplan.Track
function to fail more reliably.Updates the plan tracking functions of the pkg/plan
package to only fail when
the plan has actually finished with a failure, instead of returning errors from
in other steps of the plan.
pkg/api/deploymentapi/trafficfilterapi
EntityID
parameter validationFixes a small bug where the EntityID
was never validated.
Adds a badge pointing to the pkg.go.dev
reference for the SDK.
Published by karencfv over 3 years ago
multierror.Prefixed
errors are now sorted and concurrently safe.Previously, multierror.Prefixed
returned the errors in the order they were added,
to counter potential ordering issues and to consistently return the same output, the
errors are sorted before they are returned as a string in Error()
.
Additionally, the structure has been made concurrently safe.
Updated the swagger specification and auto-generated models and APIs to ECE 2.8.0
.
stackapi.List
returns the versions properly sortedProperly sorts stackapi.List()
via semver.
depresourceapi.NewElasticsearch()
processes plugins listThe list of plugins was being ignored, it is now considered.
Fixed the broken README example.
Published by karencfv almost 4 years ago
AsList
workaround for deptemplateapi
As the bug with the GET deployments/template/{template_id}
endpoint for
ESS users has been fixed, we no longer need to use the AsList field when
calling it.
The CRUD and association traffic filtering APIs have been
implemented. They can be found in the new trafficfilterapi
package.
The new ResetElasticsearchPassword
API resets a deployment's
Elasticsearch password and returns the username and password. This new
API can be found within the depresourceapi
package.
Both Get()
and Update()
APIs have been added for the remote
clusters APIs, which power ESS Cross Cluster Search assignments.
Added a new Migrate()
API to the deploymentapi
package.
This new API returns a deployment update request that would
transform this deployment from its template to the provided one.
Introduces a series of changes which allow allocator.Vacate()
to
return a multierror which can serialize the errors to JSON format.
To do so, multiple changes have been made throughout multiple packages,
providing building blocks for other APIs to leverage these, or use on-
demand.
multierror.WithFormat()
: modifies a multierror.Prefixed
or Hashicorp
multierror.Error
format functions which instead of formatting with a
"text" format, return a JSON formatted string.
apierror.JSONError{}
: wrapping any string with this type, will make
it compatible to json.Marshal
-ed. A apierror.NewJSONError()
function
is provided for convenience too, allowing errors to be wrapped in the type.
plan.StreamJSON
: has been fixed to return the final error result in
JSON formatted form.
plan
: Legacy format has now been removed since it's no longer used.
allocatorapi.VacateError
: now used for most of the returned vacate
errors since it supports both text and JSON formats.
allocatorapi
A new Size
parameter has been added to ListParams
in theallocatorapi
package, which allows users to obtain more than the default 100 allocator size.
A new optional boolean to deploymentapi.Get()
which allows users
to optionally convert the legacy plan format to the current format.
New FailFast
parameter to pool.Params
which allows consumers to
toggle a new pool behavior where the pool will gracefully stop when one of
the workers returns with an error. This will stop processing any additional
work but try to continue processing the work that's in-flight or cancel the
execution when the params.Timeout.Stop
time.Duration
is exceeded.
Added a new implementation of http.RoundTripper
which aims to unify all
existing segregated RoundTrippers which have been marked as deprecated.
Additionally, adding support to configurable retries on request timeout
through two new api.Config
fields: Retries
and RetryBackoff
.
To keep backwards compatibility, the retries are opt-in even though they
would improve the resilience of the SDK. They can always be made opt-out
in the future if we deem it necessary.
Published by marclop about 4 years ago
Minor bug fix release
Adds the status code of the POST traffic rule association to 201
to match all of the endpoint API responses.
Published by marclop about 4 years ago
Changes the constructor behavior of NewAPI
and the Config
validation now only accepts an auth.APIKey
or *auth.APIKey
as the
only valid AuthWriters for the API when the host is set to the ESS host
(https://api.elastic-cloud.com
). Also adds a constant: ESSEndpoint
.
Adds a new function to the deploymentapi
pkg: deploymentapi.RequestID
which will always return a request ID to be
used in deploymentapi.CreateParams
. It will either return an auto-
generated string of 64 characters or the string argument which is passed
to the function.
Adds a new package called deploymentsize
and a new function:
ParseGb
which will parse a string in the format of <size>g
, into its
value in megabytes as an int32. Valid examples of parseable sizes are in
0.5g
increments, with a minimum accepted size of 0.5g
.
api.Config
parameterThe Region
field on api.Config
has been removed from the structure.
Instead of using a global Region parameter, all APIs which require a region
to be specified as a parameter, will expose a Region
parameter to be used.
Modified the Update function parameters to allow the consumer to specify
a PayloadOverrides which can be used to override nested values in the resources.
Currently supports overrides for Version
, Name
and Region
.
Added a new configuration parameter RedactAuth
to api.VerboseSettings
when set, will replace the contents of the Authorization
header with
[REDACTED]
.
The default behavior still preserves the original contents of the header.
Adds support for the enterprise_search
resource kind on all APIs, namely:
deployment APIs, allocator vacate APIs and plan tracking functions.
Packages previously published a public API through ecctl/pkg/...
, have
been move to the cloud-sdk-go
, with an api
suffix in the package name.
The full list of packages which have been added as part of this change is:
pkg/api/platformapi
pkg/api/platformapi/configurationtemplateapi
pkg/api/platformapi/allocatorapi
pkg/api/platformapi/instanceconfigapi
pkg/api/platformapi/snaprepoapi
pkg/api/platformapi/enrollmenttokenapi
pkg/api/platformapi/proxyapi
pkg/api/platformapi/proxyapi/filteredgroupapi
pkg/api/platformapi/roleapi
pkg/api/platformapi/runnerapi
pkg/api/platformapi/constructorapi
pkg/api/stackapi
pkg/api/userapi
pkg/api/userapi/authapi
pkg/api/userapi/authapi/adminapi
pkg/api/deploymentapi
pkg/api/deploymentapi/eskeystoreapi
pkg/api/deploymentapi/noteapi
pkg/api/deploymentapi/depresourceapi
pkg/api/deploymentapi/deptemplateapi
Added a context.Context
constructor (api.WithRegion
) which creates a
new context with a saved value equal to the passed region. This is meant
to be used in any calls to the auto-generated API which are region-bound
(any /platform
APIs).
When using *api.CloudClientRuntime
, the path interpolation will take
place without the need to explicitly handle it.
This change allows the *api.API
object to be used accross multiple
regions rather than requiring a single instance of that structure per
region.
Adds certain handling of API operation string fields to be handled as raw
JSON fields so that double quotes in said fields aren't escaped by the
runtime, the excluded operations are:
set-es-cluster-metadata-raw
update-user
update-current-user
Adds the ability to assert certain *http.Request
fields which
are sent to the http.RoundTripper on any of the request / reply flows
which are tested and asserted in our unit tests. Since it's an optional
field, it doesn't enforce that field to be set in the mock.Response
,
but rather make it optional for those tests where it makes sense to do so.
apivalidator
testing layerAdded a new apivalidator
executable:
A CLI running a series of requests based off a specified apidocs file
(which can be either a local file or downloaded from it's location), against
a prism API validation proxy, and then returns errors based on discrepancies.
A new Makefile with targets to start a prism validation proxy for the public
API, another to run the validation tests against the proxy, and another to run
both without having to start a new terminal and killing the server when it finishes.
Additionally, these tests are now run on every make swagger
to verify endpoint
availability when new client
and models
are generated from a swagger spec.
Published by karencfv over 4 years ago
Adds a new DecodeFlags function which through reflection and
mapstructure is able to decode a cobra.Command defined flags into a
structure's fields which match the flag's type and mapstructure tag.
Adds a new package under pkg/multierror which is aimed to be used
instead of multierror.Error. The main motivation behind this change is
to enforce a prefix to be used in all of the multierrors which will
provide more context to the error consumers.
Modifies the ErrCatchTransport type so that it handles the case when
Content-Type is text/html, the auto-generated client framework won't
be able to handle the proxied responses of that type since they're
contingent on the error response specified by the swagger definition,
thus anything with a Content-Type different than application/json
won't be handled and instead a cryptic error will be returned.
New TrackChange function which uses the deployments
API to track any pending changes of a Deployment. It supports tracking
changes by specifying a DeploymentID or ResourceID and Kind which
is very similar to what the legacy plan tracker did.
Published by marclop over 4 years ago
This release contains bug fixes, version updates, and development improvements.
As usual, the autogenerated Go code has been updated to match the 2.5.0 ECE API swagger specification.
Allows the user to configure a user agent via api.Config.UserAgent
. If the field is not set, it defaults
to cloud-sdk-go/<version>
, which after this release will be cloud-sdk-go/2.5.0
.
Fixes a bug in the plan tracker logic which made it return the first
step which finished with status "error" rather than the last step. This
has many downstream effects but most notably, makes vacates miss the end
result of the vacate and potentially flag a cluster vacate as sucessful
when it is not.
Published by karencfv over 4 years ago
Updates swagger to v0.22.0
Published by karencfv over 4 years ago
Introduces a cmdutil
package for common utility functions a cli can use
Published by ppapapetrou76 over 4 years ago
Published by ppapapetrou76 almost 5 years ago
Published by karencfv almost 5 years ago
Adds a Timeout field of time.Duration to the api.Config structure, allowing users to set the Timeout value for all API calls.
Updates various dependencies to their latest versions.
Published by marclop almost 5 years ago
Adds a new type ErrCatchTransport
which implements http.RoundTripper. Its intended usage is to be used as the Transport for http.Client(s) which want to successfully be able to unwrap all possible errors returned by the autogenerated code from the swagger definition via api.UnwrapError
.
Published by marclop almost 5 years ago
Adds an api.Version
variable which can be used by clients to see which
ECE compatibility version it has.
Also changes the swagger target to automatically open their ${EDITOR}
after the models have been generated.
$ make swagger
[..]
--> Please update "pkg/api/version.go" with the version number of the ECE compatible definition just used for code generation.
-> Press enter to open the file with vim
Published by marclop almost 5 years ago
Published by karencfv almost 5 years ago
Published by karencfv about 5 years ago