Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
8de7714
chore: automatic empty commit
algolia-bot Aug 8, 2025
07677e9
Merge branch 'main' into chore/renovateBaseBranch
shortcuts Aug 8, 2025
60eef04
Merge branch 'main' into chore/renovateBaseBranch
shortcuts Aug 8, 2025
2a416dd
chore(deps): update dependency oxlint to v1.11.1 (#5226)
renovate[bot] Aug 9, 2025
dcf682e
chore(deps): update dependency dart to v3.8.3 (#5230)
renovate[bot] Aug 10, 2025
caf32ab
chore(deps): update dependency @cloudflare/vitest-pool-workers to v0.…
renovate[bot] Aug 10, 2025
b10b863
chore(deps): update dependency python to v3.13.6 (#5234)
renovate[bot] Aug 10, 2025
957a18b
chore(deps): update dotnet monorepo (#5236)
renovate[bot] Aug 10, 2025
2488445
chore(deps): update dependency nock to v14.0.9 (#5233)
renovate[bot] Aug 10, 2025
647cbdf
chore(deps): update dependency fs-extra to v11.3.1 (#5231)
renovate[bot] Aug 11, 2025
3992135
chore(deps): update dependency sbt/sbt to v1.11.4 (#5235)
renovate[bot] Aug 11, 2025
2c48623
chore(deps): update eslint monorepo to v9.33.0 (#5239)
renovate[bot] Aug 11, 2025
2baddef
chore(deps): update dependency wiremock.net to 1.9.0 (#5240)
renovate[bot] Aug 15, 2025
6647d78
chore(deps): update dependency vite to v7.1.2 (#5238)
renovate[bot] Aug 15, 2025
71ee92f
chore(deps): update dependency lint-staged to v16.1.5 (#5232)
renovate[bot] Aug 15, 2025
27cc264
chore(deps): update dependency @cloudflare/vitest-pool-workers to v0.…
renovate[bot] Aug 16, 2025
8a98694
chore(deps): update dependency nock to v14.0.10 (#5246)
renovate[bot] Aug 16, 2025
f425fc2
chore(deps): update dependency @types/react to v19.1.10 (#5244)
renovate[bot] Aug 16, 2025
517dcc4
chore(deps): update dependency oxlint to v1.11.2 (#5247)
renovate[bot] Aug 16, 2025
2d2b63a
chore(deps): update dependency dart to v3.9.0 (#5250)
renovate[bot] Aug 17, 2025
ffdf0e4
chore(deps): update dependency python to v3.13.7 (#5248)
renovate[bot] Aug 17, 2025
d8d1cad
chore(deps): update dependency @openapitools/openapi-generator-cli to…
renovate[bot] Aug 17, 2025
d926f98
chore(deps): update dependency csharpier to 1.1.2 (#5256)
renovate[bot] Aug 22, 2025
03a2d96
chore(deps): update dependency xunit.runner.visualstudio to 3.1.4 (#5…
renovate[bot] Aug 22, 2025
c12e790
chore(deps): update dependency com.github.sbt:sbt-ci-release to v1.11…
renovate[bot] Aug 22, 2025
a31c185
chore(deps): update dependency chalk to v5.6.0 (#5258)
renovate[bot] Aug 22, 2025
6a77bd8
chore(deps): update dependency oxlint to v1.12.0 (#5259)
renovate[bot] Aug 22, 2025
8272612
chore(deps): update dependency @cloudflare/vitest-pool-workers to v0.…
renovate[bot] Aug 23, 2025
d2a2e1f
chore(deps): update dependency @types/react to v19.1.11 (#5261)
renovate[bot] Aug 23, 2025
b62dc30
chore(deps): update dependency dart to v3.9.1 (#5262)
renovate[bot] Aug 23, 2025
71c356d
chore(deps): update dependency vite to v7.1.3 (#5263)
renovate[bot] Aug 23, 2025
cb198b8
chore(deps): update yarn to v4.9.3 (#5264)
renovate[bot] Aug 23, 2025
57530c4
chore(deps): update dependency chai to v5.3.3 (#5265)
renovate[bot] Aug 23, 2025
81401be
chore(deps): update dependency knip to v5.63.0 (#5266)
renovate[bot] Aug 23, 2025
e1a317a
chore(deps): update dependency wiremock.net to 1.10.1 (#5270)
renovate[bot] Aug 24, 2025
bfa0a9f
chore(deps): update eslint monorepo to v9.34.0 (#5271)
renovate[bot] Aug 24, 2025
3598d21
Merge branch 'main' into chore/renovateBaseBranch
shortcuts Aug 25, 2025
ac7d921
chore: update Gradle action to version 4.4.1 in workflow files
Fluf22 Aug 25, 2025
5a220ca
chore: downgrade Gradle version to 8.14.3 in wrapper properties
Fluf22 Aug 25, 2025
96626e9
chore: set Java source and target compatibility to version 1.8
Fluf22 Aug 25, 2025
75a3ab0
chore(deps): update dependency esbuild to v0.25.9 (#5245)
renovate[bot] Aug 25, 2025
a3cc715
chore(deps): update dependency sbt/sbt to v1.11.5 (#5272)
renovate[bot] Aug 25, 2025
202f0a8
fix(deps): update module github.com/stretchr/testify to v1.11.0 (#5273)
renovate[bot] Aug 25, 2025
17dcba9
chore(deps): update node.js to v22.18.0 (#5228)
renovate[bot] Aug 25, 2025
933f69e
chore: pin Gradle action to v4.4.1 commit hash
Fluf22 Aug 25, 2025
ba3f822
chore(deps): update dependency chai to v6 (#5269)
renovate[bot] Aug 25, 2025
0c5b8c6
chore(deps): update dependency golang to v1.25.0
renovate[bot] Aug 25, 2025
4a1cc71
chore(deps): update Go version to 1.25.0
Fluf22 Aug 25, 2025
53977a0
chore(deps): update golangci-lint version to support go1.25
Fluf22 Aug 25, 2025
cf4fd24
Merge branch 'chore/renovateBaseBranch' into renovate/golang-1.x
Fluf22 Aug 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ runs:
if: ${{ inputs.language == 'go' }}
shell: bash
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.3
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.4.0
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
go install golang.org/x/tools/cmd/[email protected]

Expand Down
71 changes: 71 additions & 0 deletions clients/algoliasearch-client-go/.golangci.bck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
linters-settings:
govet:
enable-all: true
disable:
- fieldalignment

revive:
rules:
- name: var-naming
disabled: true

linters:
enable-all: true

disable:
- godox
- bodyclose
- contextcheck
- interfacebloat
- gci
- gosmopolitan
- wsl
- varnamelen
- nlreturn
- err113
- gochecknoglobals
- exhaustruct
- exhaustive
- depguard
- lll
- forbidigo
- gochecknoinits
- cyclop
- errorlint
- gomnd
- tagliatelle
- nilnil
- stylecheck
- musttag
- errchkjson
- nonamedreturns
- inamedparam
- ineffassign
- dupword
- nestif
- goconst
- funlen
- dupl
- unparam
- gocognit
- forcetypeassert
- wastedassign
- gocyclo
- maintidx
- copyloopvar
- intrange
- canonicalheader
- mnd
- perfsprint
- containedctx

# Deprecated
- execinquery
- exportloopref

issues:
exclude-generated: disable

run:
concurrency: 2
timeout: 10m
129 changes: 71 additions & 58 deletions clients/algoliasearch-client-go/.golangci.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,84 @@
linters-settings:
govet:
enable-all: true
disable:
- fieldalignment

revive:
rules:
- name: var-naming
disabled: true

version: "2"
run:
concurrency: 2
linters:
enable-all: true

default: all
disable:
- godox
- bodyclose
- canonicalheader
- containedctx
- contextcheck
- interfacebloat
- gci
- gosmopolitan
- wsl
- varnamelen
- nlreturn
- copyloopvar
- cyclop
- depguard
- dupl
- dupword
- err113
- gochecknoglobals
- exhaustruct
- errchkjson
- errorlint
- exhaustive
- depguard
- lll
- exhaustruct
- forbidigo
- gochecknoinits
- cyclop
- errorlint
- gomnd
- tagliatelle
- nilnil
- stylecheck
- musttag
- errchkjson
- nonamedreturns
- inamedparam
- ineffassign
- dupword
- nestif
- goconst
- forcetypeassert
- funcorder
- funlen
- dupl
- unparam
- gochecknoglobals
- gochecknoinits
- gocognit
- forcetypeassert
- wastedassign
- goconst
- gocyclo
- maintidx
- copyloopvar
- godox
- gosmopolitan
- inamedparam
- ineffassign
- interfacebloat
- intrange
- canonicalheader
- lll
- maintidx
- mnd
- musttag
- nestif
- nilnil
- nlreturn
- noctx
- noinlineerr
- nonamedreturns
- perfsprint
- containedctx

# Deprecated
- execinquery
- exportloopref

issues:
exclude-generated: disable

run:
concurrency: 2
timeout: 10m
- recvcheck
- staticcheck
- tagliatelle
- unparam
- varnamelen
- wastedassign
- wsl
settings:
govet:
disable:
- fieldalignment
enable-all: true
revive:
rules:
- name: var-naming
disabled: true
exclusions:
generated: disable
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- gofumpt
- goimports
exclusions:
generated: disable
paths:
- third_party$
- builtin$
- examples$
5 changes: 5 additions & 0 deletions clients/algoliasearch-client-go/algolia/debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ func Display(input any) {
if !debug {
return
}

start := time.Now()

var msg string

switch v := input.(type) {
case *http.Request:
msg = debugRequest(v)
Expand All @@ -40,6 +43,7 @@ func Display(input any) {
default:
msg = fmt.Sprintf("do not know how to display %#v", v)
}

Println(msg)
fmt.Printf("took %s\n", time.Since(start))
}
Expand All @@ -52,6 +56,7 @@ func Printf(format string, a ...any) {
if !debug {
return
}

msg := fmt.Sprintf(format, a...)
fmt.Printf("> ALGOLIA DEBUG: %s", msg)
}
10 changes: 10 additions & 0 deletions clients/algoliasearch-client-go/algolia/debug/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ func copyReadCloser(r io.ReadCloser) (io.ReadCloser, string) {
if r == nil {
return nil, ""
}

data, err := io.ReadAll(r)
_ = r.Close()

if err != nil {
return nil, ""
}

return io.NopCloser(bytes.NewReader(data)), string(data)
}

Expand All @@ -29,10 +32,12 @@ func decodeGzipContent(in string) (string, error) {
if err != nil {
return in, fmt.Errorf("cannot open content with gzip.Reader: %w", err)
}

out, err := io.ReadAll(gr)
if err != nil {
return in, fmt.Errorf("cannot read content from gzip.Reader: %w", err)
}

return string(out), nil
}

Expand All @@ -58,10 +63,12 @@ func extractBody(body io.ReadCloser, c compression.Compression) (io.ReadCloser,

func prettyPrintJSON(input string) string {
var b bytes.Buffer

err := json.Indent(&b, []byte(input), "\t", " ")
if err != nil {
return input
}

return strings.TrimSuffix(b.String(), "\n")
}

Expand All @@ -88,8 +95,10 @@ func debugRequest(req *http.Request) string {
if strings.Contains(strings.ToLower(k), "algolia") {
str = strings.Repeat("*", len(str))
}

msg += fmt.Sprintf("\theader=%s:%q\n", k, str)
}

msg += fmt.Sprintf("\tbody=\n\t%s\n", prettyPrintJSON(body))

return msg
Expand All @@ -101,6 +110,7 @@ func debugResponse(res *http.Response) string {
}

var body string

res.Body, body = extractBody(res.Body, compression.NONE)

msg := "> ALGOLIA DEBUG response:\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func (e *NoMoreHostToTryError) Error() string {
if len(e.intermediateNetworkErrors) > 0 {
return fmt.Errorf("all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. %w", errors.Join(e.intermediateNetworkErrors...)).Error()
}

return "all hosts have been contacted unsuccessfully, it can either be a server or a network error or wrong appID/key credentials were used. You can use 'ExposeIntermediateNetworkErrors: true' in the config to investigate."
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type Host struct {

type RetryStrategy struct {
sync.RWMutex

hosts []StatefulHost
writeTimeout time.Duration
readTimeout time.Duration
Expand Down Expand Up @@ -107,7 +108,7 @@ func (s *RetryStrategy) Decide(h Host, code int, err error) Outcome {
return Retry
}

if !(isZero(code) || is4xx(code) || is2xx(code)) || isNetworkError(err) {
if (!isZero(code) && !is4xx(code) && !is2xx(code)) || isNetworkError(err) {
s.markDown(h)
return Retry
}
Expand Down Expand Up @@ -146,6 +147,7 @@ func isNetworkError(err error) bool {
if err == nil {
return false
}

_, ok := err.(net.Error)
// We need to ensure that the error is a net.Error but not a
// context.DeadlineExceeded error (which is actually a net.Error), because
Expand All @@ -157,6 +159,7 @@ func isTimeoutError(err error) bool {
if err == nil {
return false
}

return strings.Contains(err.Error(), context.DeadlineExceeded.Error())
}

Expand Down
Loading
Loading