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

Commit

Permalink
Update dependencies (#3847)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
Co-authored-by: Ivan Fernandez Calvo <[email protected]>
  • Loading branch information
3 people authored Jul 18, 2024
1 parent 6d6c0c2 commit 58f10b6
Show file tree
Hide file tree
Showing 7 changed files with 639 additions and 481 deletions.
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 @@ import (
"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
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 @@ import (
"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 @@ func CopyFileToContainer(ctx context.Context, containerName string, srcPath stri
}
}

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 @@ -315,7 +318,7 @@ func InspectContainer(service ServiceRequest) (*types.ContainerJSON, error) {
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 @@ func ListContainers() ([]types.Container, error) {
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 @@ func RemoveContainer(containerName string) error {
defer dockerClient.Close()
ctx := context.Background()

options := types.ContainerRemoveOptions{
options := container.RemoveOptions{
Force: true,
RemoveVolumes: true,
}
Expand Down Expand Up @@ -544,7 +547,7 @@ func PullImages(ctx context.Context, images []string) {

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 @@ func PullImages(ctx context.Context, images []string) {
}).Info("Pulling Docker images...")

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

Expand Down

0 comments on commit 58f10b6

Please sign in to comment.