Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
ea45713c
Commit
ea45713c
authored
Nov 24, 2021
by
Arran Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update workhorse's zipartifacts to work with Go 1.17
parent
ab8d113a
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
11 deletions
+9
-11
workhorse/cmd/gitlab-zip-cat/main.go
workhorse/cmd/gitlab-zip-cat/main.go
+1
-1
workhorse/go.mod
workhorse/go.mod
+1
-0
workhorse/go.sum
workhorse/go.sum
+2
-0
workhorse/internal/zipartifacts/metadata.go
workhorse/internal/zipartifacts/metadata.go
+2
-1
workhorse/internal/zipartifacts/metadata_test.go
workhorse/internal/zipartifacts/metadata_test.go
+1
-1
workhorse/internal/zipartifacts/open_archive.go
workhorse/internal/zipartifacts/open_archive.go
+1
-1
workhorse/internal/zipartifacts/open_archive_test.go
workhorse/internal/zipartifacts/open_archive_test.go
+1
-7
No files found.
workhorse/cmd/gitlab-zip-cat/main.go
View file @
ea45713c
package
main
package
main
import
(
import
(
"archive/zip"
"context"
"context"
"errors"
"errors"
"flag"
"flag"
...
@@ -9,6 +8,7 @@ import (
...
@@ -9,6 +8,7 @@ import (
"io"
"io"
"os"
"os"
zip
"gitlab.com/gitlab-org/golang-archive-zip"
"gitlab.com/gitlab-org/labkit/mask"
"gitlab.com/gitlab-org/labkit/mask"
"gitlab.com/gitlab-org/gitlab/workhorse/internal/zipartifacts"
"gitlab.com/gitlab-org/gitlab/workhorse/internal/zipartifacts"
...
...
workhorse/go.mod
View file @
ea45713c
...
@@ -29,6 +29,7 @@ require (
...
@@ -29,6 +29,7 @@ require (
github.com/smartystreets/goconvey v1.6.4
github.com/smartystreets/goconvey v1.6.4
github.com/stretchr/testify v1.7.0
github.com/stretchr/testify v1.7.0
gitlab.com/gitlab-org/gitaly/v14 v14.3.0-rc2.0.20211007055622-df7dadcc3f74
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
gitlab.com/gitlab-org/labkit v1.6.0
gocloud.dev v0.23.0
gocloud.dev v0.23.0
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8
...
...
workhorse/go.sum
View file @
ea45713c
...
@@ -835,6 +835,8 @@ gitlab.com/gitlab-org/gitaly/v14 v14.3.0-rc2.0.20211007055622-df7dadcc3f74 h1:7R
...
@@ -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/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.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/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-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 v0.0.0-20200908084045-45895e129029/go.mod h1:SNfxkfUwVNECgtmluVayv0GWFgEjjBs5AzgsowPQuo0=
gitlab.com/gitlab-org/labkit v1.0.0/go.mod h1:nohrYTSLDnZix0ebXZrbZJjymRar8HeV2roWL5/jw2U=
gitlab.com/gitlab-org/labkit v1.0.0/go.mod h1:nohrYTSLDnZix0ebXZrbZJjymRar8HeV2roWL5/jw2U=
...
...
workhorse/internal/zipartifacts/metadata.go
View file @
ea45713c
package
zipartifacts
package
zipartifacts
import
(
import
(
"archive/zip"
"compress/gzip"
"compress/gzip"
"encoding/binary"
"encoding/binary"
"encoding/json"
"encoding/json"
...
@@ -9,6 +8,8 @@ import (
...
@@ -9,6 +8,8 @@ import (
"path"
"path"
"sort"
"sort"
"strconv"
"strconv"
zip
"gitlab.com/gitlab-org/golang-archive-zip"
)
)
type
metadata
struct
{
type
metadata
struct
{
...
...
workhorse/internal/zipartifacts/metadata_test.go
View file @
ea45713c
package
zipartifacts_test
package
zipartifacts_test
import
(
import
(
"archive/zip"
"bytes"
"bytes"
"compress/gzip"
"compress/gzip"
"context"
"context"
...
@@ -12,6 +11,7 @@ import (
...
@@ -12,6 +11,7 @@ import (
"testing"
"testing"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/require"
zip
"gitlab.com/gitlab-org/golang-archive-zip"
"gitlab.com/gitlab-org/gitlab/workhorse/internal/zipartifacts"
"gitlab.com/gitlab-org/gitlab/workhorse/internal/zipartifacts"
)
)
...
...
workhorse/internal/zipartifacts/open_archive.go
View file @
ea45713c
package
zipartifacts
package
zipartifacts
import
(
import
(
"archive/zip"
"context"
"context"
"fmt"
"fmt"
"io"
"io"
...
@@ -12,6 +11,7 @@ import (
...
@@ -12,6 +11,7 @@ import (
"gitlab.com/gitlab-org/gitlab/workhorse/internal/helper/httptransport"
"gitlab.com/gitlab-org/gitlab/workhorse/internal/helper/httptransport"
"gitlab.com/gitlab-org/gitlab/workhorse/internal/httprs"
"gitlab.com/gitlab-org/gitlab/workhorse/internal/httprs"
zip
"gitlab.com/gitlab-org/golang-archive-zip"
"gitlab.com/gitlab-org/labkit/mask"
"gitlab.com/gitlab-org/labkit/mask"
)
)
...
...
workhorse/internal/zipartifacts/open_archive_test.go
View file @
ea45713c
package
zipartifacts
package
zipartifacts
import
(
import
(
"archive/zip"
"bytes"
"bytes"
"context"
"context"
"fmt"
"fmt"
...
@@ -10,11 +9,10 @@ import (
...
@@ -10,11 +9,10 @@ import (
"net/http/httptest"
"net/http/httptest"
"os"
"os"
"path/filepath"
"path/filepath"
"runtime"
"strings"
"testing"
"testing"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/require"
zip
"gitlab.com/gitlab-org/golang-archive-zip"
)
)
func
createArchive
(
t
*
testing
.
T
,
dir
string
)
(
map
[
string
][]
byte
,
int64
)
{
func
createArchive
(
t
*
testing
.
T
,
dir
string
)
(
map
[
string
][]
byte
,
int64
)
{
...
@@ -73,10 +71,6 @@ func TestOpenHTTPArchive(t *testing.T) {
...
@@ -73,10 +71,6 @@ func TestOpenHTTPArchive(t *testing.T) {
}
}
func
TestMinimalRangeRequests
(
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
()
dir
:=
t
.
TempDir
()
entries
,
archiveSize
:=
createArchive
(
t
,
dir
)
entries
,
archiveSize
:=
createArchive
(
t
,
dir
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment