Skip to content

Commit 47ac227

Browse files
authored
Chore: bump package to v9 (#975)
* Bump package to v9 * Update TypedAPI to v9.1.0 (c6ef5fb) * bring back benchmark from the future
1 parent 0ffca4b commit 47ac227

File tree

4,567 files changed

+31808
-18794
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,567 files changed

+31808
-18794
lines changed

Makefile

+5-6
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ endif
3333
ifdef race
3434
$(eval testintegargs += "-race")
3535
endif
36-
$(eval testintegargs += "-cover" "-coverpkg=github.com/elastic/go-elasticsearch/v8,github.com/elastic/go-elasticsearch/v8/esutil,github.com/elastic/go-elasticsearch/v8/typedapi" "-coverprofile=$(PWD)/tmp/integration-client.cov" "-tags='$(testintegtags)'" "-timeout=1h")
36+
$(eval testintegargs += "-cover" "-coverpkg=github.com/elastic/go-elasticsearch/v9,github.com/elastic/go-elasticsearch/v9/esutil,github.com/elastic/go-elasticsearch/v9/typedapi" "-coverprofile=$(PWD)/tmp/integration-client.cov" "-tags='$(testintegtags)'" "-timeout=1h")
3737
@if which gotestsum > /dev/null 2>&1 ; then \
3838
cd internal/testing/e2e; \
3939
echo "gotestsum --format=short-verbose --junitfile=$(PWD)/tmp/integration-report.xml --" $(testintegargs); \
@@ -49,7 +49,7 @@ test-api: ## Run generated API integration tests
4949
ifdef race
5050
$(eval testapiargs += "-race")
5151
endif
52-
$(eval testapiargs += "-cover" "-coverpkg=github.com/elastic/go-elasticsearch/v8/esapi" "-coverprofile=$(PWD)/tmp/integration-api.cov" "-tags='integration'" "-timeout=1h")
52+
$(eval testapiargs += "-cover" "-coverpkg=github.com/elastic/go-elasticsearch/v9/esapi" "-coverprofile=$(PWD)/tmp/integration-api.cov" "-tags='integration'" "-timeout=1h")
5353
ifdef flavor
5454
else
5555
$(eval flavor='free')
@@ -101,7 +101,6 @@ test-examples: ## Execute the _examples
101101
@printf "\033[2m→ Testing the examples...\033[0m\n"
102102
@{ \
103103
set -e ; \
104-
trap "test -d .git && git checkout --quiet _examples/**/go.mod" INT TERM EXIT; \
105104
for d in _examples/*/; do \
106105
printf "\033[2m────────────────────────────────────────────────────────────────────────────────\n"; \
107106
printf "\033[1mUpdating dependencies for $$d\033[0m\n"; \
@@ -266,9 +265,9 @@ endif
266265

267266
godoc: ## Display documentation for the package
268267
@printf "\033[2m→ Generating documentation...\033[0m\n"
269-
@echo "* http://localhost:6060/pkg/github.com/elastic/go-elasticsearch/v8"
270-
@echo "* http://localhost:6060/pkg/github.com/elastic/go-elasticsearch/v8/esapi"
271-
@echo "* http://localhost:6060/pkg/github.com/elastic/go-elasticsearch/v8/esutil"
268+
@echo "* http://localhost:6060/pkg/github.com/elastic/go-elasticsearch/v9"
269+
@echo "* http://localhost:6060/pkg/github.com/elastic/go-elasticsearch/v9/esapi"
270+
@echo "* http://localhost:6060/pkg/github.com/elastic/go-elasticsearch/v9/esutil"
272271
@printf "\n"
273272
godoc --http=localhost:6060 --play
274273

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ or
77
**[sign-up](https://cloud.elastic.co/registration?elektra=en-ess-sign-up-page)**
88
**for a free trial of Elastic Cloud**.
99

10-
[![Go Reference](https://pkg.go.dev/github.com/elastic/go-elasticsearch?status.svg)](https://pkg.go.dev/github.com/elastic/go-elasticsearch/v8)
10+
[![Go Reference](https://pkg.go.dev/github.com/elastic/go-elasticsearch?status.svg)](https://pkg.go.dev/github.com/elastic/go-elasticsearch/v9)
1111
[![Go Report Card](https://goreportcard.com/badge/github.com/elastic/go-elasticsearch)](https://goreportcard.com/report/github.com/elastic/go-elasticsearch)
1212
[![codecov.io](https://codecov.io/github/elastic/go-elasticsearch/coverage.svg?branch=main)](https://codecov.io/gh/elastic/go-elasticsearch?branch=main)
1313
[![Build](https://github.com/elastic/go-elasticsearch/workflows/Build/badge.svg)](https://github.com/elastic/go-elasticsearch/actions?query=branch%3Amain)
@@ -28,23 +28,23 @@ Elasticsearch language clients are only backwards compatible with default distri
2828

2929
When using Go modules, include the version in the import path, and specify either an explicit version or a branch:
3030

31-
require github.com/elastic/go-elasticsearch/v8 v8.0.0
32-
require github.com/elastic/go-elasticsearch/v7 7.17
31+
require github.com/elastic/go-elasticsearch/v9 v9.x.x
32+
require github.com/elastic/go-elasticsearch/v8 v8.x.x
3333

3434
It's possible to use multiple versions of the client in a single project:
3535

3636
// go.mod
37-
github.com/elastic/go-elasticsearch/v7 v7.17.0
38-
github.com/elastic/go-elasticsearch/v8 v8.0.0
37+
github.com/elastic/go-elasticsearch/v8 v8.18.0
38+
github.com/elastic/go-elasticsearch/v9 v9.0.0
3939

4040
// main.go
4141
import (
42-
elasticsearch7 "github.com/elastic/go-elasticsearch/v7"
43-
elasticsearch8 "github.com/elastic/go-elasticsearch/v8"
42+
elasticsearch7 "github.com/elastic/go-elasticsearch/v8"
43+
elasticsearch8 "github.com/elastic/go-elasticsearch/v9"
4444
)
4545
// ...
46-
es7, _ := elasticsearch7.NewDefaultClient()
47-
es8, _ := elasticsearch8.NewDefaultClient()
46+
es8, _ := elasticsearch7.NewDefaultClient()
47+
es9, _ := elasticsearch8.NewDefaultClient()
4848

4949
The `main` branch of the client is compatible with the current `master` branch of Elasticsearch.
5050

_benchmarks/benchmarks/actions/001_ping.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ import (
2121
"io"
2222
"io/ioutil"
2323

24-
"github.com/elastic/go-elasticsearch/v8/esapi"
24+
"github.com/elastic/go-elasticsearch/v9/esapi"
2525

26-
"github.com/elastic/go-elasticsearch/v8/benchmarks"
27-
"github.com/elastic/go-elasticsearch/v8/benchmarks/runner"
26+
"github.com/elastic/go-elasticsearch/v9/benchmarks"
27+
"github.com/elastic/go-elasticsearch/v9/benchmarks/runner"
2828
)
2929

3030
func init() {

_benchmarks/benchmarks/actions/002_info.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ import (
2121
"io"
2222
"io/ioutil"
2323

24-
"github.com/elastic/go-elasticsearch/v8/esapi"
24+
"github.com/elastic/go-elasticsearch/v9/esapi"
2525

26-
"github.com/elastic/go-elasticsearch/v8/benchmarks"
27-
"github.com/elastic/go-elasticsearch/v8/benchmarks/runner"
26+
"github.com/elastic/go-elasticsearch/v9/benchmarks"
27+
"github.com/elastic/go-elasticsearch/v9/benchmarks/runner"
2828
)
2929

3030
func init() {

_benchmarks/benchmarks/actions/003_get.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ import (
2424
"io/ioutil"
2525
"strings"
2626

27-
"github.com/elastic/go-elasticsearch/v8/esapi"
27+
"github.com/elastic/go-elasticsearch/v9/esapi"
2828
"github.com/tidwall/gjson"
2929

30-
"github.com/elastic/go-elasticsearch/v8/benchmarks"
31-
"github.com/elastic/go-elasticsearch/v8/benchmarks/runner"
30+
"github.com/elastic/go-elasticsearch/v9/benchmarks"
31+
"github.com/elastic/go-elasticsearch/v9/benchmarks/runner"
3232
)
3333

3434
func init() {

_benchmarks/benchmarks/actions/004_index.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ import (
2424
"io/ioutil"
2525
"math/rand"
2626

27-
"github.com/elastic/go-elasticsearch/v8/esapi"
27+
"github.com/elastic/go-elasticsearch/v9/esapi"
2828
"github.com/tidwall/gjson"
2929

30-
"github.com/elastic/go-elasticsearch/v8/benchmarks"
31-
"github.com/elastic/go-elasticsearch/v8/benchmarks/runner"
30+
"github.com/elastic/go-elasticsearch/v9/benchmarks"
31+
"github.com/elastic/go-elasticsearch/v9/benchmarks/runner"
3232
)
3333

3434
func init() {

_benchmarks/benchmarks/actions/005_bulk.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ import (
2525

2626
"github.com/tidwall/gjson"
2727

28-
"github.com/elastic/go-elasticsearch/v8/esapi"
28+
"github.com/elastic/go-elasticsearch/v9/esapi"
2929

30-
"github.com/elastic/go-elasticsearch/v8/benchmarks"
31-
"github.com/elastic/go-elasticsearch/v8/benchmarks/runner"
30+
"github.com/elastic/go-elasticsearch/v9/benchmarks"
31+
"github.com/elastic/go-elasticsearch/v9/benchmarks/runner"
3232
)
3333

3434
func init() {

_benchmarks/benchmarks/actions/006_bulk_helper.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ import (
2525

2626
"github.com/elastic/elastic-transport-go/v8/elastictransport"
2727

28-
"github.com/elastic/go-elasticsearch/v8"
29-
"github.com/elastic/go-elasticsearch/v8/esapi"
30-
"github.com/elastic/go-elasticsearch/v8/esutil"
28+
"github.com/elastic/go-elasticsearch/v9"
29+
"github.com/elastic/go-elasticsearch/v9/esapi"
30+
"github.com/elastic/go-elasticsearch/v9/esutil"
3131

32-
"github.com/elastic/go-elasticsearch/v8/benchmarks"
33-
"github.com/elastic/go-elasticsearch/v8/benchmarks/runner"
32+
"github.com/elastic/go-elasticsearch/v9/benchmarks"
33+
"github.com/elastic/go-elasticsearch/v9/benchmarks/runner"
3434
)
3535

3636
func init() {
@@ -123,7 +123,7 @@ func init() {
123123

124124
biStats := bi.Stats()
125125
if biStats.NumFailed > 0 {
126-
return nil, fmt.Errorf("Unexpected failures: %s", biStats)
126+
return nil, fmt.Errorf("Unexpected failures: %v", biStats)
127127
}
128128
if int(biStats.NumAdded) != c.NumOperations {
129129
return nil, fmt.Errorf("Unexpected failures: added=%d, expected=%d", biStats.NumAdded, c.NumOperations)

_benchmarks/benchmarks/benchmarks.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ package benchmarks
2020
import (
2121
"bytes"
2222

23-
"github.com/elastic/go-elasticsearch/v8/benchmarks/runner"
23+
"github.com/elastic/go-elasticsearch/v9/benchmarks/runner"
2424
)
2525

2626
var (
@@ -32,7 +32,6 @@ var (
3232
)
3333

3434
// Action represents a benchmarked action.
35-
//
3635
type Action struct {
3736
Name string
3837
Category string
@@ -45,7 +44,6 @@ type Action struct {
4544
}
4645

4746
// Register appends op to the list of operations.
48-
//
4947
func Register(a Action) error {
5048
Actions = append(Actions, a)
5149
return nil

_benchmarks/benchmarks/cmd/main.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ import (
3232
"github.com/montanaflynn/stats"
3333

3434
"github.com/elastic/elastic-transport-go/v8/elastictransport"
35-
"github.com/elastic/go-elasticsearch/v8"
35+
"github.com/elastic/go-elasticsearch/v9"
3636

37-
"github.com/elastic/go-elasticsearch/v8/benchmarks"
38-
"github.com/elastic/go-elasticsearch/v8/benchmarks/runner"
37+
"github.com/elastic/go-elasticsearch/v9/benchmarks"
38+
"github.com/elastic/go-elasticsearch/v9/benchmarks/runner"
3939

40-
_ "github.com/elastic/go-elasticsearch/v8/benchmarks/actions"
40+
_ "github.com/elastic/go-elasticsearch/v9/benchmarks/actions"
4141
)
4242

4343
var (

_benchmarks/benchmarks/go.mod

+18-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
1-
module github.com/elastic/go-elasticsearch/v8/benchmarks
1+
module github.com/elastic/go-elasticsearch/v9/benchmarks
22

3-
go 1.22
3+
go 1.23
44

5-
toolchain go1.22.0
5+
toolchain go1.24.2
66

7-
replace github.com/elastic/go-elasticsearch/v8 => ../../
7+
replace github.com/elastic/go-elasticsearch/v9 => ../../
88

99
require (
1010
github.com/elastic/elastic-transport-go/v8 v8.6.1
11-
github.com/elastic/go-elasticsearch/v8 v8.0.0-20200408073057-6f36a473b19f
11+
github.com/elastic/go-elasticsearch/v9 v9.0.0-00010101000000-000000000000
1212
github.com/fatih/color v1.7.0
1313
github.com/montanaflynn/stats v0.6.3
1414
github.com/tidwall/gjson v1.9.3
1515
)
1616

17-
require github.com/mattn/go-colorable v0.1.6 // indirect
17+
require (
18+
github.com/go-logr/logr v1.4.2 // indirect
19+
github.com/go-logr/stdr v1.2.2 // indirect
20+
github.com/mattn/go-colorable v0.1.6 // indirect
21+
github.com/mattn/go-isatty v0.0.12 // indirect
22+
github.com/tidwall/match v1.1.1 // indirect
23+
github.com/tidwall/pretty v1.2.0 // indirect
24+
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
25+
go.opentelemetry.io/otel v1.35.0 // indirect
26+
go.opentelemetry.io/otel/metric v1.35.0 // indirect
27+
go.opentelemetry.io/otel/trace v1.35.0 // indirect
28+
golang.org/x/sys v0.19.0 // indirect
29+
)

0 commit comments

Comments
 (0)