diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-24 18:14:31 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-24 18:14:31 +0000 |
commit | 844eb8879aa445d8a5ee0f2ba3ee1ccf18319ef1 (patch) | |
tree | 051c632f870cbffd93efccda0711b3ae3a5885df /workhorse | |
parent | b8d516a6876de74b68a800c5b69af9448b0de140 (diff) | |
download | gitlab-ce-844eb8879aa445d8a5ee0f2ba3ee1ccf18319ef1.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'workhorse')
-rw-r--r-- | workhorse/cmd/gitlab-zip-cat/main.go | 2 | ||||
-rw-r--r-- | workhorse/go.mod | 1 | ||||
-rw-r--r-- | workhorse/go.sum | 2 | ||||
-rw-r--r-- | workhorse/internal/zipartifacts/metadata.go | 3 | ||||
-rw-r--r-- | workhorse/internal/zipartifacts/metadata_test.go | 2 | ||||
-rw-r--r-- | workhorse/internal/zipartifacts/open_archive.go | 2 | ||||
-rw-r--r-- | workhorse/internal/zipartifacts/open_archive_test.go | 8 |
7 files changed, 9 insertions, 11 deletions
diff --git a/workhorse/cmd/gitlab-zip-cat/main.go b/workhorse/cmd/gitlab-zip-cat/main.go index 12a4187bad1..05170ba5994 100644 --- a/workhorse/cmd/gitlab-zip-cat/main.go +++ b/workhorse/cmd/gitlab-zip-cat/main.go @@ -1,7 +1,6 @@ package main import ( - "archive/zip" "context" "errors" "flag" @@ -9,6 +8,7 @@ import ( "io" "os" + zip "gitlab.com/gitlab-org/golang-archive-zip" "gitlab.com/gitlab-org/labkit/mask" "gitlab.com/gitlab-org/gitlab/workhorse/internal/zipartifacts" diff --git a/workhorse/go.mod b/workhorse/go.mod index 1d9ae69289c..8b1cbeeba36 100644 --- a/workhorse/go.mod +++ b/workhorse/go.mod @@ -29,6 +29,7 @@ require ( github.com/smartystreets/goconvey v1.6.4 github.com/stretchr/testify v1.7.0 gitlab.com/gitlab-org/gitaly/v14 v14.3.0-rc2.0.20211007055622-df7dadcc3f74 + gitlab.com/gitlab-org/golang-archive-zip v0.1.0 gitlab.com/gitlab-org/labkit v1.6.0 gocloud.dev v0.23.0 golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 diff --git a/workhorse/go.sum b/workhorse/go.sum index c5bcf1571be..7dfb3515403 100644 --- a/workhorse/go.sum +++ b/workhorse/go.sum @@ -835,6 +835,8 @@ gitlab.com/gitlab-org/gitaly/v14 v14.3.0-rc2.0.20211007055622-df7dadcc3f74 h1:7R gitlab.com/gitlab-org/gitaly/v14 v14.3.0-rc2.0.20211007055622-df7dadcc3f74/go.mod h1:2McjFiZrwflPGtXSquCAXWzewmxTPytoI/vamNz/QPM= gitlab.com/gitlab-org/gitlab-shell v1.9.8-0.20201117050822-3f9890ef73dc/go.mod h1:5QSTbpAHY2v0iIH5uHh2KA9w7sPUqPmnLjDApI/sv1U= gitlab.com/gitlab-org/gitlab-shell v1.9.8-0.20210720163109-50da611814d2/go.mod h1:QWDYBwuy24qGMandtCngLRPzFgnGPg6LSNoJWPKmJMc= +gitlab.com/gitlab-org/golang-archive-zip v0.1.0 h1:7PoEX9KIr7dBuQDTE+hBQwlOs7PKYsekATrj/i/nR4c= +gitlab.com/gitlab-org/golang-archive-zip v0.1.0/go.mod h1:ZDtqpWPGPB9qBuZnZDrKQjIdJtkN7ZAoVwhT6H2o2kE= gitlab.com/gitlab-org/labkit v0.0.0-20190221122536-0c3fc7cdd57c/go.mod h1:rYhLgfrbEcyfinG+R3EvKu6bZSsmwQqcXzLfHWSfUKM= gitlab.com/gitlab-org/labkit v0.0.0-20200908084045-45895e129029/go.mod h1:SNfxkfUwVNECgtmluVayv0GWFgEjjBs5AzgsowPQuo0= gitlab.com/gitlab-org/labkit v1.0.0/go.mod h1:nohrYTSLDnZix0ebXZrbZJjymRar8HeV2roWL5/jw2U= diff --git a/workhorse/internal/zipartifacts/metadata.go b/workhorse/internal/zipartifacts/metadata.go index 1ecf52deafb..456d2c101cb 100644 --- a/workhorse/internal/zipartifacts/metadata.go +++ b/workhorse/internal/zipartifacts/metadata.go @@ -1,7 +1,6 @@ package zipartifacts import ( - "archive/zip" "compress/gzip" "encoding/binary" "encoding/json" @@ -9,6 +8,8 @@ import ( "path" "sort" "strconv" + + zip "gitlab.com/gitlab-org/golang-archive-zip" ) type metadata struct { diff --git a/workhorse/internal/zipartifacts/metadata_test.go b/workhorse/internal/zipartifacts/metadata_test.go index ffc5f58cb21..353ed4376f6 100644 --- a/workhorse/internal/zipartifacts/metadata_test.go +++ b/workhorse/internal/zipartifacts/metadata_test.go @@ -1,7 +1,6 @@ package zipartifacts_test import ( - "archive/zip" "bytes" "compress/gzip" "context" @@ -12,6 +11,7 @@ import ( "testing" "github.com/stretchr/testify/require" + zip "gitlab.com/gitlab-org/golang-archive-zip" "gitlab.com/gitlab-org/gitlab/workhorse/internal/zipartifacts" ) diff --git a/workhorse/internal/zipartifacts/open_archive.go b/workhorse/internal/zipartifacts/open_archive.go index ec2fd691038..881ef915d75 100644 --- a/workhorse/internal/zipartifacts/open_archive.go +++ b/workhorse/internal/zipartifacts/open_archive.go @@ -1,7 +1,6 @@ package zipartifacts import ( - "archive/zip" "context" "fmt" "io" @@ -12,6 +11,7 @@ import ( "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper/httptransport" "gitlab.com/gitlab-org/gitlab/workhorse/internal/httprs" + zip "gitlab.com/gitlab-org/golang-archive-zip" "gitlab.com/gitlab-org/labkit/mask" ) diff --git a/workhorse/internal/zipartifacts/open_archive_test.go b/workhorse/internal/zipartifacts/open_archive_test.go index ea1fc606784..e339454345b 100644 --- a/workhorse/internal/zipartifacts/open_archive_test.go +++ b/workhorse/internal/zipartifacts/open_archive_test.go @@ -1,7 +1,6 @@ package zipartifacts import ( - "archive/zip" "bytes" "context" "fmt" @@ -10,11 +9,10 @@ import ( "net/http/httptest" "os" "path/filepath" - "runtime" - "strings" "testing" "github.com/stretchr/testify/require" + zip "gitlab.com/gitlab-org/golang-archive-zip" ) func createArchive(t *testing.T, dir string) (map[string][]byte, int64) { @@ -73,10 +71,6 @@ func TestOpenHTTPArchive(t *testing.T) { } func TestMinimalRangeRequests(t *testing.T) { - if strings.HasPrefix(runtime.Version(), "go1.17") { - t.Skipf("skipped for go1.17: https://gitlab.com/gitlab-org/gitlab/-/issues/340778") - } - dir := t.TempDir() entries, archiveSize := createArchive(t, dir) |