Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
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-workhorse
Commits
5a93a95e
Commit
5a93a95e
authored
Oct 18, 2018
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix make verify / fmt on master
parent
ac407baa
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
58 additions
and
64 deletions
+58
-64
Makefile
Makefile
+1
-1
_support/validate-formatting.sh
_support/validate-formatting.sh
+1
-1
authorization_test.go
authorization_test.go
+2
-2
gitaly_test.go
gitaly_test.go
+6
-7
internal/builds/register.go
internal/builds/register.go
+1
-0
internal/builds/register_test.go
internal/builds/register_test.go
+1
-0
internal/filestore/file_handler_test.go
internal/filestore/file_handler_test.go
+0
-1
internal/git/archive.go
internal/git/archive.go
+2
-2
internal/git/archive_test.go
internal/git/archive_test.go
+1
-0
internal/git/archivereader.go
internal/git/archivereader.go
+1
-0
internal/git/blob.go
internal/git/blob.go
+2
-2
internal/git/diff.go
internal/git/diff.go
+3
-4
internal/git/format-patch.go
internal/git/format-patch.go
+3
-4
internal/git/responsewriter.go
internal/git/responsewriter.go
+2
-2
internal/gitaly/diff.go
internal/gitaly/diff.go
+1
-2
internal/redis/keywatcher.go
internal/redis/keywatcher.go
+3
-4
internal/redis/redis.go
internal/redis/redis.go
+3
-4
internal/redis/redis_test.go
internal/redis/redis_test.go
+3
-3
internal/senddata/senddata.go
internal/senddata/senddata.go
+2
-2
internal/staticpages/error_pages.go
internal/staticpages/error_pages.go
+2
-2
internal/testhelper/gitaly.go
internal/testhelper/gitaly.go
+0
-2
internal/upload/accelerate.go
internal/upload/accelerate.go
+2
-2
internal/upstream/upstream.go
internal/upstream/upstream.go
+2
-2
internal/zipartifacts/open_archive.go
internal/zipartifacts/open_archive.go
+1
-0
logging.go
logging.go
+1
-0
main.go
main.go
+2
-2
main_test.go
main_test.go
+3
-5
raven.go
raven.go
+2
-2
terminal_test.go
terminal_test.go
+1
-2
upload_test.go
upload_test.go
+4
-4
No files found.
Makefile
View file @
5a93a95e
...
...
@@ -146,7 +146,7 @@ govendor-sync: $(TARGET_SETUP)
.PHONY
:
fmt
fmt
:
$(TARGET_SETUP) install-goimports
$(
call
message,
$@
)
@
goimports
-w
-l
$(LOCAL_GO_FILES)
@
goimports
-w
-l
ocal
$(PKG)
-l
$(LOCAL_GO_FILES)
.PHONY
:
goimports
install-goimports
:
$(TARGET_SETUP)
...
...
_support/validate-formatting.sh
View file @
5a93a95e
...
...
@@ -2,7 +2,7 @@
set
-eu
IMPORT_RESULT
=
$(
goimports
-e
-l
"
$@
"
)
IMPORT_RESULT
=
$(
goimports
-e
-l
ocal
"gitlab.com/gitlab-org/gitlab-workhorse"
-l
"
$@
"
)
if
[
-n
"
${
IMPORT_RESULT
}
"
]
;
then
echo
>
&2
"Formatting or imports need fixing: 'make fmt'"
...
...
authorization_test.go
View file @
5a93a95e
...
...
@@ -7,13 +7,13 @@ import (
"regexp"
"testing"
"github.com/dgrijalva/jwt-go"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/api"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/badgateway"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/secret"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/testhelper"
"github.com/dgrijalva/jwt-go"
)
func
okHandler
(
w
http
.
ResponseWriter
,
_
*
http
.
Request
,
_
*
api
.
Response
)
{
...
...
gitaly_test.go
View file @
5a93a95e
...
...
@@ -16,19 +16,18 @@ import (
"testing"
"time"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/api"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/git"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/gitaly"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/testhelper"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/api"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/git"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/gitaly"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/testhelper"
)
func
TestFailedCloneNoGitaly
(
t
*
testing
.
T
)
{
...
...
internal/builds/register.go
View file @
5a93a95e
...
...
@@ -7,6 +7,7 @@ import (
"time"
"github.com/prometheus/client_golang/prometheus"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/redis"
)
...
...
internal/builds/register_test.go
View file @
5a93a95e
...
...
@@ -11,6 +11,7 @@ import (
"time"
"github.com/stretchr/testify/assert"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/redis"
)
...
...
internal/filestore/file_handler_test.go
View file @
5a93a95e
...
...
@@ -15,7 +15,6 @@ import (
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/filestore"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/objectstore/test"
)
...
...
internal/git/archive.go
View file @
5a93a95e
...
...
@@ -15,12 +15,12 @@ import (
"regexp"
"time"
"github.com/prometheus/client_golang/prometheus"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/gitaly"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/senddata"
"github.com/prometheus/client_golang/prometheus"
)
type
archive
struct
{
senddata
.
Prefix
}
...
...
internal/git/archive_test.go
View file @
5a93a95e
...
...
@@ -6,6 +6,7 @@ import (
"testing"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/testhelper"
)
...
...
internal/git/archivereader.go
View file @
5a93a95e
...
...
@@ -8,6 +8,7 @@ import (
"syscall"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
)
...
...
internal/git/blob.go
View file @
5a93a95e
...
...
@@ -6,12 +6,12 @@ import (
"net/http"
"strings"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/gitaly"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/log"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/senddata"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
)
type
blob
struct
{
senddata
.
Prefix
}
...
...
internal/git/diff.go
View file @
5a93a95e
...
...
@@ -5,14 +5,13 @@ import (
"io"
"net/http"
"github.com/golang/protobuf/jsonpb"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/gitaly"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/log"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/senddata"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
"github.com/golang/protobuf/jsonpb"
)
type
diff
struct
{
senddata
.
Prefix
}
...
...
internal/git/format-patch.go
View file @
5a93a95e
...
...
@@ -5,14 +5,13 @@ import (
"io"
"net/http"
"github.com/golang/protobuf/jsonpb"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/gitaly"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/log"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/senddata"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
"github.com/golang/protobuf/jsonpb"
)
type
patch
struct
{
senddata
.
Prefix
}
...
...
internal/git/responsewriter.go
View file @
5a93a95e
...
...
@@ -4,9 +4,9 @@ import (
"net/http"
"strconv"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
"github.com/prometheus/client_golang/prometheus"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
)
const
(
...
...
internal/gitaly/diff.go
View file @
5a93a95e
...
...
@@ -6,9 +6,8 @@ import (
"io"
"net/http"
"gitlab.com/gitlab-org/gitaly/streamio"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
"gitlab.com/gitlab-org/gitaly/streamio"
)
type
DiffClient
struct
{
...
...
internal/redis/keywatcher.go
View file @
5a93a95e
...
...
@@ -6,13 +6,12 @@ import (
"sync"
"time"
log
"github.com/sirupsen/logrus"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
"github.com/garyburd/redigo/redis"
"github.com/jpillora/backoff"
"github.com/prometheus/client_golang/prometheus"
log
"github.com/sirupsen/logrus"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
)
var
(
...
...
internal/redis/redis.go
View file @
5a93a95e
...
...
@@ -7,13 +7,12 @@ import (
"net/url"
"time"
log
"github.com/sirupsen/logrus"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/config"
sentinel
"github.com/FZambia/go-sentinel"
"github.com/garyburd/redigo/redis"
"github.com/prometheus/client_golang/prometheus"
log
"github.com/sirupsen/logrus"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/config"
)
var
(
...
...
internal/redis/redis_test.go
View file @
5a93a95e
...
...
@@ -4,12 +4,12 @@ import (
"testing"
"time"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/config"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
"github.com/garyburd/redigo/redis"
"github.com/rafaeljusto/redigomock"
"github.com/stretchr/testify/assert"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/config"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
)
// Setup a MockPool for Redis
...
...
internal/senddata/senddata.go
View file @
5a93a95e
...
...
@@ -3,9 +3,9 @@ package senddata
import
(
"net/http"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
"github.com/prometheus/client_golang/prometheus"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
)
var
(
...
...
internal/staticpages/error_pages.go
View file @
5a93a95e
...
...
@@ -6,9 +6,9 @@ import (
"net/http"
"path/filepath"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
"github.com/prometheus/client_golang/prometheus"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
)
var
(
...
...
internal/testhelper/gitaly.go
View file @
5a93a95e
...
...
@@ -11,9 +11,7 @@ import (
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
log
"github.com/sirupsen/logrus"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
"golang.org/x/net/context"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
...
...
internal/upload/accelerate.go
View file @
5a93a95e
...
...
@@ -6,11 +6,11 @@ import (
"mime/multipart"
"net/http"
jwt
"github.com/dgrijalva/jwt-go"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/api"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/filestore"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/secret"
jwt
"github.com/dgrijalva/jwt-go"
)
const
RewrittenFieldsHeader
=
"Gitlab-Workhorse-Multipart-Fields"
...
...
internal/upstream/upstream.go
View file @
5a93a95e
...
...
@@ -11,13 +11,13 @@ import (
"net/http"
"strings"
"github.com/sebest/xff"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/badgateway"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/config"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/upload"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/urlprefix"
"github.com/sebest/xff"
)
var
(
...
...
internal/zipartifacts/open_archive.go
View file @
5a93a95e
...
...
@@ -12,6 +12,7 @@ import (
"time"
"github.com/jfbus/httprs"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
)
...
...
logging.go
View file @
5a93a95e
...
...
@@ -10,6 +10,7 @@ import (
"github.com/client9/reopen"
log
"github.com/sirupsen/logrus"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
)
...
...
main.go
View file @
5a93a95e
...
...
@@ -23,14 +23,14 @@ import (
"syscall"
"time"
"github.com/prometheus/client_golang/prometheus/promhttp"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/config"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/log"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/queueing"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/redis"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/secret"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/upstream"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
// Version is the current version of GitLab Workhorse
...
...
main_test.go
View file @
5a93a95e
...
...
@@ -18,6 +18,9 @@ import (
"time"
log
"github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/api"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/config"
...
...
@@ -26,11 +29,6 @@ import (
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/testhelper"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/upstream"
pb
"gitlab.com/gitlab-org/gitaly-proto/go"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
const
scratchDir
=
"testdata/scratch"
...
...
raven.go
View file @
5a93a95e
...
...
@@ -4,9 +4,9 @@ import (
"net/http"
"os"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
"github.com/getsentry/raven-go"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/helper"
)
func
wrapRaven
(
h
http
.
Handler
)
http
.
Handler
{
...
...
terminal_test.go
View file @
5a93a95e
...
...
@@ -13,9 +13,8 @@ import (
"testing"
"time"
log
"github.com/sirupsen/logrus"
"github.com/gorilla/websocket"
log
"github.com/sirupsen/logrus"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/api"
)
...
...
upload_test.go
View file @
5a93a95e
...
...
@@ -11,14 +11,14 @@ import (
"strings"
"testing"
"github.com/dgrijalva/jwt-go"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/api"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/secret"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/testhelper"
"gitlab.com/gitlab-org/gitlab-workhorse/internal/upload"
"github.com/dgrijalva/jwt-go"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
type
uploadArtifactsFunction
func
(
url
,
contentType
string
,
body
io
.
Reader
)
(
*
http
.
Response
,
string
,
error
)
...
...
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