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

Update dependencies #3847

Merged
merged 10 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 8 additions & 5 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ jobs:
with:
go-version-file: .go-version
- name: golangci-lint
uses: golangci/golangci-lint-action@v3.4.0
uses: golangci/golangci-lint-action@v6.0.1
with:
version: v1.51.2
args: --timeout=30m --whole-files
# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.59.1
# Optional: golangci-lint command line arguments.
args: --timeout=30m
# Optional: if set to true then the all caching functionality will be complete disabled,
# takes precedence over all other caching options.
skip-cache: true
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.20.5
1.22.5
14 changes: 8 additions & 6 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ builds:
main: ./cli/main.go
binary: op
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
- id: rename_arch
name_template: >-
{{- .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end -}}
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down
228 changes: 160 additions & 68 deletions go.mod

Large diffs are not rendered by default.

846 changes: 452 additions & 394 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internal/deploy/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"go.elastic.co/apm/v2"

log "github.com/sirupsen/logrus"
tc "github.com/testcontainers/testcontainers-go"
tc "github.com/testcontainers/testcontainers-go/modules/compose"
)

// ServiceManager manages lifecycle of a service
Expand Down Expand Up @@ -212,8 +212,8 @@
composeFilePaths = append(composeFilePaths, composeFilePath)
}

compose := tc.NewLocalDockerCompose(composeFilePaths, profile.Name)

Check failure on line 215 in internal/deploy/compose.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

SA1019: tc.NewLocalDockerCompose is deprecated: NewLocalDockerCompose returns a DockerCompose compatible instance which is superseded by ComposeStack use NewDockerCompose instead to get a ComposeStack compatible instance (staticcheck)
dc := compose.

Check failure on line 216 in internal/deploy/compose.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

SA1019: compose.
WithCommand(command).
WithEnv(env)

Expand Down
15 changes: 9 additions & 6 deletions internal/deploy/docker_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
"github.com/cenkalti/backoff/v4"
"github.com/docker/cli/cli/connhelper"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/filters"
imageTypes "github.com/docker/docker/api/types/image"
"github.com/docker/docker/api/types/registry"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/stdcopy"
"github.com/elastic/e2e-testing/internal/shell"
Expand Down Expand Up @@ -138,7 +141,7 @@
}
}

err = dockerClient.CopyToContainer(ctx, containerName, parentDir, &buffer, types.CopyToContainerOptions{AllowOverwriteDirWithFile: true})
err = dockerClient.CopyToContainer(ctx, containerName, parentDir, &buffer, container.CopyToContainerOptions{AllowOverwriteDirWithFile: true})
if err != nil {
log.WithFields(log.Fields{
"container": containerName,
Expand Down Expand Up @@ -176,7 +179,7 @@
}).Trace("Creating command to be executed in container")

response, err := dockerClient.ContainerExecCreate(
ctx, containerName, types.ExecConfig{

Check failure on line 182 in internal/deploy/docker_client.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

SA1019: types.ExecConfig is deprecated: use [container.ExecOptions]. (staticcheck)
User: user,
Tty: tty,
AttachStdin: false,
Expand Down Expand Up @@ -207,7 +210,7 @@
"tty": tty,
}).Trace("Command to be executed in container created")

resp, err := dockerClient.ContainerExecAttach(ctx, response.ID, types.ExecStartCheck{

Check failure on line 213 in internal/deploy/docker_client.go

View workflow job for this annotation

GitHub Actions / lint (ubuntu-latest)

SA1019: types.ExecStartCheck is deprecated: use [container.ExecStartOptions] or [container.ExecAttachOptions]. (staticcheck)
Detach: detach,
Tty: tty,
})
Expand Down Expand Up @@ -315,7 +318,7 @@
labelFilters := filters.NewArgs()
labelFilters.Add("name", service.Name)

containers, err := dockerClient.ContainerList(context.Background(), types.ContainerListOptions{All: true, Filters: labelFilters})
containers, err := dockerClient.ContainerList(context.Background(), container.ListOptions{All: true, Filters: labelFilters})
if err != nil {
log.WithFields(log.Fields{
"error": err,
Expand All @@ -342,7 +345,7 @@
defer dockerClient.Close()
ctx := context.Background()

containers, err := dockerClient.ContainerList(ctx, types.ContainerListOptions{})
containers, err := dockerClient.ContainerList(ctx, container.ListOptions{})
if err != nil {
return []types.Container{}, err
}
Expand All @@ -355,7 +358,7 @@
defer dockerClient.Close()
ctx := context.Background()

options := types.ContainerRemoveOptions{
options := container.RemoveOptions{
Force: true,
RemoveVolumes: true,
}
Expand Down Expand Up @@ -544,7 +547,7 @@

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

authConfig := types.AuthConfig{
authConfig := registry.AuthConfig{
Username: os.Getenv("DOCKER_USER"),
Password: os.Getenv("DOCKER_PASSWORD"),
}
Expand All @@ -555,7 +558,7 @@
}).Info("Pulling Docker images...")

for _, image := range images {
options := types.ImagePullOptions{
options := imageTypes.PullOptions{
Platform: platform,
}

Expand Down
Loading