Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit 58f10b6

Browse files
Update dependencies (#3847)
* Update dependencies * fix: bump Go version * fix: tidy * fix: update golangci/golangci-lint-action action * fix: update testcontainers dependencies * fix: update go-testcontainers * test: try other options for golangci-lint-action * fix: otel dependencies * fix: goreleaser * fix: golint (partial) --------- Co-authored-by: Ivan Fernandez Calvo <kuisathaverat@users.noreply.github.com> Co-authored-by: Ivan Fernandez Calvo <kuisathaverat@gmail.com>
1 parent 6d6c0c2 commit 58f10b6

7 files changed

Lines changed: 639 additions & 481 deletions

File tree

.github/workflows/golangci-lint.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ jobs:
1919
with:
2020
go-version-file: .go-version
2121
- name: golangci-lint
22-
uses: golangci/golangci-lint-action@v3.4.0
22+
uses: golangci/golangci-lint-action@v6.0.1
2323
with:
24-
version: v1.51.2
25-
args: --timeout=30m --whole-files
26-
# Optional: show only new issues if it's a pull request. The default value is `false`.
27-
only-new-issues: true
24+
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
25+
version: v1.59.1
26+
# Optional: golangci-lint command line arguments.
27+
args: --timeout=30m
28+
# Optional: if set to true then the all caching functionality will be complete disabled,
29+
# takes precedence over all other caching options.
30+
skip-cache: true

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.20.5
1+
1.22.5

.goreleaser.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ builds:
1919
main: ./cli/main.go
2020
binary: op
2121
archives:
22-
- replacements:
23-
darwin: Darwin
24-
linux: Linux
25-
windows: Windows
26-
386: i386
27-
amd64: x86_64
22+
- id: rename_arch
23+
name_template: >-
24+
{{- .ProjectName }}_
25+
{{- title .Os }}_
26+
{{- if eq .Arch "amd64" }}x86_64
27+
{{- else if eq .Arch "386" }}i386
28+
{{- else }}{{ .Arch }}{{ end }}
29+
{{- if .Arm }}v{{ .Arm }}{{ end -}}
2830
checksum:
2931
name_template: 'checksums.txt'
3032
snapshot:

go.mod

Lines changed: 160 additions & 68 deletions
Large diffs are not rendered by default.

go.sum

Lines changed: 452 additions & 394 deletions
Large diffs are not rendered by default.

internal/deploy/compose.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"go.elastic.co/apm/v2"
1717

1818
log "github.com/sirupsen/logrus"
19-
tc "github.com/testcontainers/testcontainers-go"
19+
tc "github.com/testcontainers/testcontainers-go/modules/compose"
2020
)
2121

2222
// ServiceManager manages lifecycle of a service

internal/deploy/docker_client.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ import (
2323
"github.com/cenkalti/backoff/v4"
2424
"github.com/docker/cli/cli/connhelper"
2525
"github.com/docker/docker/api/types"
26+
"github.com/docker/docker/api/types/container"
2627
"github.com/docker/docker/api/types/filters"
28+
imageTypes "github.com/docker/docker/api/types/image"
29+
"github.com/docker/docker/api/types/registry"
2730
"github.com/docker/docker/client"
2831
"github.com/docker/docker/pkg/stdcopy"
2932
"github.com/elastic/e2e-testing/internal/shell"
@@ -138,7 +141,7 @@ func CopyFileToContainer(ctx context.Context, containerName string, srcPath stri
138141
}
139142
}
140143

141-
err = dockerClient.CopyToContainer(ctx, containerName, parentDir, &buffer, types.CopyToContainerOptions{AllowOverwriteDirWithFile: true})
144+
err = dockerClient.CopyToContainer(ctx, containerName, parentDir, &buffer, container.CopyToContainerOptions{AllowOverwriteDirWithFile: true})
142145
if err != nil {
143146
log.WithFields(log.Fields{
144147
"container": containerName,
@@ -315,7 +318,7 @@ func InspectContainer(service ServiceRequest) (*types.ContainerJSON, error) {
315318
labelFilters := filters.NewArgs()
316319
labelFilters.Add("name", service.Name)
317320

318-
containers, err := dockerClient.ContainerList(context.Background(), types.ContainerListOptions{All: true, Filters: labelFilters})
321+
containers, err := dockerClient.ContainerList(context.Background(), container.ListOptions{All: true, Filters: labelFilters})
319322
if err != nil {
320323
log.WithFields(log.Fields{
321324
"error": err,
@@ -342,7 +345,7 @@ func ListContainers() ([]types.Container, error) {
342345
defer dockerClient.Close()
343346
ctx := context.Background()
344347

345-
containers, err := dockerClient.ContainerList(ctx, types.ContainerListOptions{})
348+
containers, err := dockerClient.ContainerList(ctx, container.ListOptions{})
346349
if err != nil {
347350
return []types.Container{}, err
348351
}
@@ -355,7 +358,7 @@ func RemoveContainer(containerName string) error {
355358
defer dockerClient.Close()
356359
ctx := context.Background()
357360

358-
options := types.ContainerRemoveOptions{
361+
options := container.RemoveOptions{
359362
Force: true,
360363
RemoveVolumes: true,
361364
}
@@ -544,7 +547,7 @@ func PullImages(ctx context.Context, images []string) {
544547

545548
platform := "linux/" + utils.GetArchitecture()
546549

547-
authConfig := types.AuthConfig{
550+
authConfig := registry.AuthConfig{
548551
Username: os.Getenv("DOCKER_USER"),
549552
Password: os.Getenv("DOCKER_PASSWORD"),
550553
}
@@ -555,7 +558,7 @@ func PullImages(ctx context.Context, images []string) {
555558
}).Info("Pulling Docker images...")
556559

557560
for _, image := range images {
558-
options := types.ImagePullOptions{
561+
options := imageTypes.PullOptions{
559562
Platform: platform,
560563
}
561564

0 commit comments

Comments
 (0)