Skip to content

Commit efe9b87

Browse files
authored
Update cloud-sdk-go to 1.11.0. (#598)
- Fixed tests breaking due to cloud-sdk-go update. - Makes a version bump spf13/cobra necessary as well - Had to update some usages that are now deprecated - golangci-lint was broken due to the version being too old, updating the version fixed it - Regenerated outdated docs
1 parent 35ebdc7 commit efe9b87

14 files changed

+74
-33
lines changed

.golangci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
issues:
2-
max-issues-per-linter: 0
3-
max-same-issues: 0
4-
51
linters:
62
disable:
73
- dupl
@@ -48,6 +44,8 @@ linters-settings:
4844
- hugeParam
4945

5046
issues:
47+
max-issues-per-linter: 0
48+
max-same-issues: 0
5149
# Excluding configuration per-path, per-linter, per-text and per-source
5250
exclude-rules:
5351
- path: _test\.go

NOTICE

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ecctl
2-
Copyright 2019-2021 Elasticsearch B.V.
2+
Copyright 2019-2022 Elasticsearch B.V.
33

44
This product includes software developed at Elasticsearch B.V. and
55
third-party software developed by the licenses listed below.
@@ -17,6 +17,4 @@ github.com/asaskevich/govalidator MIT
1717
github.com/spf13/viper MIT
1818
github.com/stretchr/testify MIT
1919

20-
21-
2220
=========================================================================

build/Makefile.deps

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ VERSION_DIR:=$(GOBIN)/versions
66

77
VERSION_GOLINT:=v0.0.0-20191125180803-fdd1cda4f05f
88
VERSION_GOLICENSER:=v0.3.0
9-
VERSION_GOLANGCILINT:=v1.38.0
9+
VERSION_GOLANGCILINT:=v1.50.1
1010
VERSION_GOBINDATA:=v0.0.0-20190711162640-ee3c2418e368
1111
VERSION_GORELEASER:=v1.2.5
1212
VERSION_VERSIONBUMP:=v1.1.0

cmd/comment/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
var createCmd = &cobra.Command{
3131
Use: "create <message> --resource-type <resource-type> --resource-id <resource-id>",
3232
Short: cmdutil.AdminReqDescription("Creates a new resource comment"),
33-
PreRunE: cobra.ExactValidArgs(1),
33+
PreRunE: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
3434
RunE: func(cmd *cobra.Command, args []string) error {
3535
resourceType, _ := cmd.Flags().GetString("resource-type")
3636
resourceID, _ := cmd.Flags().GetString("resource-id")

cmd/comment/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
var deleteCmd = &cobra.Command{
3131
Use: "delete <comment id> --resource-type <resource-type> --resource-id <resource-id>",
3232
Short: cmdutil.AdminReqDescription("Deletes a resource comment"),
33-
PreRunE: cobra.ExactValidArgs(1),
33+
PreRunE: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
3434
RunE: func(cmd *cobra.Command, args []string) error {
3535
resourceType, _ := cmd.Flags().GetString("resource-type")
3636
resourceID, _ := cmd.Flags().GetString("resource-id")

cmd/deployment/testdata/want_generate-payload.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,52 @@
5353
"value": 1024
5454
},
5555
"zone_count": 2
56+
},
57+
{
58+
"elasticsearch": {},
59+
"instance_configuration_id": "gcp.coordinating.1",
60+
"node_roles": null,
61+
"node_type": {
62+
"data": false,
63+
"ingest": true,
64+
"master": false
65+
},
66+
"size": {
67+
"resource": "memory",
68+
"value": 0
69+
},
70+
"zone_count": 2
71+
},
72+
{
73+
"elasticsearch": {},
74+
"instance_configuration_id": "gcp.master.1",
75+
"node_roles": null,
76+
"node_type": {
77+
"data": false,
78+
"ingest": false,
79+
"master": true
80+
},
81+
"size": {
82+
"resource": "memory",
83+
"value": 0
84+
},
85+
"zone_count": 3
86+
},
87+
{
88+
"elasticsearch": {},
89+
"instance_configuration_id": "gcp.ml.1",
90+
"node_roles": null,
91+
"node_type": {
92+
"data": false,
93+
"ingest": false,
94+
"master": false,
95+
"ml": true
96+
},
97+
"size": {
98+
"resource": "memory",
99+
"value": 0
100+
},
101+
"zone_count": 1
56102
}
57103
],
58104
"deployment_template": {

docs/ecctl_user_key_delete.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ ecctl user key delete --user=<user id> <key id> <key id>... [flags]
1111
=== Options
1212

1313
----
14-
-h, --help help for delete
14+
-h, --help help for delete
15+
--user string user id for the specified action
1516
----
1617

1718
[float]
@@ -32,7 +33,6 @@ ecctl user key delete --user=<user id> <key id> <key id>... [flags]
3233
--region string Elasticsearch Service region
3334
--timeout duration Timeout to use on all HTTP calls (default 30s)
3435
--trace Enables tracing saves the trace to trace-20060102150405
35-
--user string Username to use to authenticate (If empty will look for EC_USER environment variable)
3636
--verbose Enable verbose mode
3737
--verbose-credentials When set, Authorization headers on the request/response trail will be displayed as plain text
3838
--verbose-file string When set, the verbose request/response trail will be written to the defined file

docs/ecctl_user_key_delete.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ ecctl user key delete --user=<user id> <key id> <key id>... [flags]
99
### Options
1010

1111
```
12-
-h, --help help for delete
12+
-h, --help help for delete
13+
--user string user id for the specified action
1314
```
1415

1516
### Options inherited from parent commands
@@ -29,7 +30,6 @@ ecctl user key delete --user=<user id> <key id> <key id>... [flags]
2930
--region string Elasticsearch Service region
3031
--timeout duration Timeout to use on all HTTP calls (default 30s)
3132
--trace Enables tracing saves the trace to trace-20060102150405
32-
--user string Username to use to authenticate (If empty will look for EC_USER environment variable)
3333
--verbose Enable verbose mode
3434
--verbose-credentials When set, Authorization headers on the request/response trail will be displayed as plain text
3535
--verbose-file string When set, the verbose request/response trail will be written to the defined file

docs/ecctl_user_key_list.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ ecctl user key list --user=<user id>|--all [flags]
1111
=== Options
1212

1313
----
14-
--all If specified, lists all API keys for all platform users
15-
-h, --help help for list
14+
--all If specified, lists all API keys for all platform users
15+
-h, --help help for list
16+
--user string user id for the specified action
1617
----
1718

1819
[float]
@@ -33,7 +34,6 @@ ecctl user key list --user=<user id>|--all [flags]
3334
--region string Elasticsearch Service region
3435
--timeout duration Timeout to use on all HTTP calls (default 30s)
3536
--trace Enables tracing saves the trace to trace-20060102150405
36-
--user string Username to use to authenticate (If empty will look for EC_USER environment variable)
3737
--verbose Enable verbose mode
3838
--verbose-credentials When set, Authorization headers on the request/response trail will be displayed as plain text
3939
--verbose-file string When set, the verbose request/response trail will be written to the defined file

docs/ecctl_user_key_list.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ ecctl user key list --user=<user id>|--all [flags]
99
### Options
1010

1111
```
12-
--all If specified, lists all API keys for all platform users
13-
-h, --help help for list
12+
--all If specified, lists all API keys for all platform users
13+
-h, --help help for list
14+
--user string user id for the specified action
1415
```
1516

1617
### Options inherited from parent commands
@@ -30,7 +31,6 @@ ecctl user key list --user=<user id>|--all [flags]
3031
--region string Elasticsearch Service region
3132
--timeout duration Timeout to use on all HTTP calls (default 30s)
3233
--trace Enables tracing saves the trace to trace-20060102150405
33-
--user string Username to use to authenticate (If empty will look for EC_USER environment variable)
3434
--verbose Enable verbose mode
3535
--verbose-credentials When set, Authorization headers on the request/response trail will be displayed as plain text
3636
--verbose-file string When set, the verbose request/response trail will be written to the defined file

0 commit comments

Comments
 (0)