Skip to content

Commit 1123f6a

Browse files
Anaethelionxeviknaldependabot[bot]
authored
[Backport 8.13] go1.21 (#829)
* Bump to go1.21 (#827) * Bump to go1.21 * bump examples to go1.21 * bump internals to g1.21 * bump documentation * add missing easyjson binary --------- Co-authored-by: Laurent Saint-Félix <laurent.saintfelix@elastic.co> * Bump golang.org/x/text from 0.3.2 to 0.3.8 in /_examples/bulk/kafka (#828) Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.2 to 0.3.8. - [Release notes](https://github.com/golang/text/releases) - [Commits](golang/text@v0.3.2...v0.3.8) --- updated-dependencies: - dependency-name: golang.org/x/text dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Xavier Canal i Masjuan <xeviknal@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent aa243a4 commit 1123f6a

File tree

36 files changed

+232
-302
lines changed

36 files changed

+232
-302
lines changed

.doc/getting-started.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fully typed API. This getting started shows you examples of both APIs.
99
[discrete]
1010
=== Requirements
1111

12-
Go version 1.20+
12+
Go version 1.21+
1313

1414
[discrete]
1515
=== Installation

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ before we can accept pull requests from you.
1313

1414
### Prerequisites
1515

16-
You need at least Go 1.20 to build the project.
16+
You need at least Go 1.21 to build the project.
1717

1818
Docker is used for some tests to spawn an Elasticsearch server.
1919

_examples/bulk/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ test-benchmarks: clean setup
1313
cd benchmarks && go run benchmarks.go
1414

1515
setup:
16-
go get -u github.com/mailru/easyjson/...
16+
go install github.com/mailru/easyjson/easyjson@latest
1717
cd benchmarks && go generate ./model
1818

1919
clean:

_examples/bulk/benchmarks/go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module github.com/elastic/go-elasticsearch/v8/_examples/bulk/benchmarks
22

3-
go 1.20
3+
go 1.21
4+
5+
toolchain go1.21.8
46

57
replace github.com/elastic/go-elasticsearch/v8 => ../../..
68

_examples/bulk/benchmarks/go.sum

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
2+
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
23
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
34
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
45
github.com/elastic/elastic-transport-go/v8 v8.4.0 h1:EKYiH8CHd33BmMna2Bos1rDNMM89+hdgcymI+KzJCGE=
@@ -9,18 +10,24 @@ github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ4
910
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
1011
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
1112
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
13+
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
1214
github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8=
1315
github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs=
1416
github.com/montanaflynn/stats v0.6.3 h1:F8446DrvIF5V5smZfZ8K9nrmmix0AFgevPdLruGOmzk=
1517
github.com/montanaflynn/stats v0.6.3/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc=
1618
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
19+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
1720
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
21+
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
1822
go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc=
1923
go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo=
2024
go.opentelemetry.io/otel/metric v1.21.0 h1:tlYWfeo+Bocx5kLEloTjbcDwBuELRrIFxwdQ36PlJu4=
2125
go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM=
2226
go.opentelemetry.io/otel/sdk v1.21.0 h1:FTt8qirL1EysG6sTQRZ5TokkU8d0ugCj8htOgThZXQ8=
27+
go.opentelemetry.io/otel/sdk v1.21.0/go.mod h1:Nna6Yv7PWTdgJHVRD9hIYywQBRx7pbox6nwBnZIxl/E=
2328
go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8fpfLc=
2429
go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=
2530
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
31+
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
2632
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
33+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

_examples/bulk/default.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,20 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
//go:build ignore
19-
// +build ignore
18+
//go:build bulk_default
19+
// +build bulk_default
2020

2121
// This example demonstrates indexing documents using the Elasticsearch "Bulk" API
2222
// [https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html].
2323
//
2424
// You can configure the number of documents and the batch size with command line flags:
2525
//
26-
// go run default.go -count=10000 -batch=2500
26+
// go run default.go -count=10000 -batch=2500
2727
//
2828
// The example intentionally doesn't use any abstractions or helper functions, to
2929
// demonstrate the low-level mechanics of working with the Bulk API: preparing
3030
// the meta+data payloads, sending the payloads in batches,
3131
// inspecting the error results, and printing a report.
32-
//
33-
//
3432
package main
3533

3634
import (

_examples/bulk/go.mod

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
module github.com/elastic/go-elasticsearch/v8/_examples/bulk
22

3-
go 1.11
3+
go 1.21
4+
5+
toolchain go1.21.8
46

57
replace github.com/elastic/go-elasticsearch/v8 => ../..
68

79
require (
8-
github.com/cenkalti/backoff/v4 v4.1.2 // indirect
9-
github.com/dustin/go-humanize v1.0.0 // indirect
10-
github.com/elastic/go-elasticsearch/v8 v8.0.0-20211123103400-5f8a17a2322f // indirect
11-
github.com/mailru/easyjson v0.7.7 // indirect
10+
github.com/cenkalti/backoff/v4 v4.1.2
11+
github.com/dustin/go-humanize v1.0.0
12+
github.com/elastic/go-elasticsearch/v8 v8.0.0-20211123103400-5f8a17a2322f
13+
)
14+
15+
require (
16+
github.com/elastic/elastic-transport-go/v8 v8.4.0 // indirect
17+
github.com/go-logr/logr v1.3.0 // indirect
18+
github.com/go-logr/stdr v1.2.2 // indirect
19+
go.opentelemetry.io/otel v1.21.0 // indirect
20+
go.opentelemetry.io/otel/metric v1.21.0 // indirect
21+
go.opentelemetry.io/otel/trace v1.21.0 // indirect
1222
)

_examples/bulk/go.sum

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
github.com/cenkalti/backoff/v4 v4.1.2 h1:6Yo7N8UP2K6LWZnW94DLVSSrbobcWdVzAYOisuDPIFo=
22
github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
3-
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
43
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
54
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
65
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
@@ -20,12 +19,6 @@ github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0
2019
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
2120
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2221
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
23-
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
24-
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
25-
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
26-
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
27-
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
28-
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
2922
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
3023
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
3124
go.opentelemetry.io/otel v1.21.0 h1:hzLeKBZEL7Okw2mGzZ0cc4k/A7Fta0uoPgaJCr8fsFc=
@@ -38,8 +31,5 @@ go.opentelemetry.io/otel/trace v1.21.0 h1:WD9i5gzvoUPuXIXH24ZNBudiarZDKuekPqi/E8
3831
go.opentelemetry.io/otel/trace v1.21.0/go.mod h1:LGbsEB0f9LGjN+OZaQQ26sohbOmiMR+BaslueVtS/qQ=
3932
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
4033
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
41-
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
42-
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
43-
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
4434
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
4535
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

_examples/bulk/indexer.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
//go:build ignore
19-
// +build ignore
18+
//go:build bulk_indexer
19+
// +build bulk_indexer
2020

2121
// This example demonstrates indexing documents using the esutil.BulkIndexer helper.
2222
//
2323
// You can configure the settings with command line flags:
2424
//
25-
// go run indexer.go --workers=8 --count=100000 --flush=1000000
26-
//
25+
// go run indexer.go --workers=8 --count=100000 --flush=1000000
2726
package main
2827

2928
import (

_examples/bulk/kafka/go.mod

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,41 @@
11
module github.com/elastic/go-elasticsearch/v8/_examples/bulk/kafka
22

3-
go 1.20
3+
go 1.21
4+
5+
toolchain go1.21.8
46

57
replace github.com/elastic/go-elasticsearch/v8 => ../../..
68

79
require (
8-
github.com/cucumber/godog v0.8.0 // indirect
9-
github.com/davecgh/go-spew v1.1.1 // indirect
10-
github.com/dustin/go-humanize v1.0.0 // indirect
1110
github.com/elastic/go-elasticsearch/v8 v8.0.0-20210817150010-57d659deaca7
12-
github.com/prometheus/procfs v0.0.3 // indirect
1311
github.com/segmentio/kafka-go v0.4.25
1412
go.elastic.co/apm v1.14.0
15-
go.elastic.co/apm/module/apmelasticsearch v1.14.0 // indirect
13+
)
14+
15+
require (
16+
github.com/armon/go-radix v1.0.0 // indirect
17+
github.com/elastic/elastic-transport-go/v8 v8.4.0 // indirect
18+
github.com/elastic/go-licenser v0.3.1 // indirect
19+
github.com/elastic/go-sysinfo v1.1.1 // indirect
20+
github.com/elastic/go-windows v1.0.0 // indirect
21+
github.com/go-logr/logr v1.3.0 // indirect
22+
github.com/go-logr/stdr v1.2.2 // indirect
23+
github.com/golang/snappy v0.0.1 // indirect
24+
github.com/jcchavezs/porto v0.1.0 // indirect
25+
github.com/joeshaw/multierror v0.0.0-20140124173710-69b34d4ec901 // indirect
26+
github.com/klauspost/compress v1.9.8 // indirect
27+
github.com/pierrec/lz4 v2.6.0+incompatible // indirect
28+
github.com/pkg/errors v0.8.1 // indirect
29+
github.com/prometheus/procfs v0.0.3 // indirect
30+
github.com/santhosh-tekuri/jsonschema v1.2.4 // indirect
31+
go.elastic.co/fastjson v1.1.0 // indirect
32+
go.opentelemetry.io/otel v1.21.0 // indirect
33+
go.opentelemetry.io/otel/metric v1.21.0 // indirect
34+
go.opentelemetry.io/otel/trace v1.21.0 // indirect
35+
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect
36+
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
37+
golang.org/x/sys v0.14.0 // indirect
38+
golang.org/x/text v0.3.8 // indirect
39+
golang.org/x/tools v0.1.12 // indirect
40+
howett.net/plist v0.0.0-20181124034731-591f970eefbb // indirect
1641
)

0 commit comments

Comments
 (0)