Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[image-builder] Update go dependencies (mk3) #4998

Merged
merged 4 commits into from
Aug 1, 2021
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
1 change: 0 additions & 1 deletion components/image-builder-bob/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ require (
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a
golang.org/x/net v0.0.0-20210510120150-4163338589ed // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
google.golang.org/genproto v0.0.0-20210518161634-ec7691c0a37d // indirect
google.golang.org/grpc v1.38.0
)
Expand Down
8 changes: 4 additions & 4 deletions components/image-builder-mk3/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import (
"io/ioutil"
"os"

"github.com/gitpod-io/gitpod/common-go/log"
"github.com/gitpod-io/gitpod/common-go/tracing"
"github.com/gitpod-io/gitpod/image-builder/pkg/orchestrator"

"github.com/mattn/go-isatty"
"github.com/spf13/cobra"
"golang.org/x/xerrors"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"

"github.com/gitpod-io/gitpod/common-go/log"
"github.com/gitpod-io/gitpod/common-go/tracing"
"github.com/gitpod-io/gitpod/image-builder/pkg/orchestrator"
)

var (
Expand Down
5 changes: 5 additions & 0 deletions components/image-builder-mk3/cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ var runCmd = &cobra.Command{
}

grpcOpts := []grpc.ServerOption{
// terminate the connection if the client pings more than once every 2 seconds
grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{
MinTime: 2 * time.Second,
PermitWithoutStream: true,
}),
// We don't know how good our cients are at closing connections. If they don't close them properly
// we'll be leaking goroutines left and right. Closing Idle connections should prevent that.
grpc.KeepaliveParams(keepalive.ServerParameters{MaxConnectionIdle: 30 * time.Minute}),
Expand Down
17 changes: 7 additions & 10 deletions components/image-builder-mk3/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,29 @@ module github.com/gitpod-io/gitpod/image-builder
go 1.16

require (
github.com/alecthomas/jsonschema v0.0.0-20190504002508-159cbd5dba26
github.com/containerd/containerd v1.3.4
github.com/docker/cli v0.0.0-20191001124654-d83cd9046437
github.com/alecthomas/jsonschema v0.0.0-20210526225647-edb03dcab7bc
github.com/containerd/containerd v1.5.4
github.com/docker/cli v20.10.7+incompatible
github.com/docker/distribution v2.7.1+incompatible
github.com/docker/docker v1.13.1
github.com/docker/docker-credential-helpers v0.6.3 // indirect
github.com/docker/docker v20.10.7+incompatible
github.com/docker/docker-credential-helpers v0.6.4 // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/gitpod-io/gitpod/common-go v0.0.0-00010101000000-000000000000
github.com/gitpod-io/gitpod/content-service/api v0.0.0-00010101000000-000000000000
github.com/gitpod-io/gitpod/image-builder/api v0.0.0-00010101000000-000000000000
github.com/gitpod-io/gitpod/ws-manager/api v0.0.0-00010101000000-000000000000
github.com/google/go-cmp v0.5.6
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4
github.com/hashicorp/go-retryablehttp v0.7.0
github.com/mattn/go-isatty v0.0.9
github.com/mattn/go-isatty v0.0.11
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.0.1
github.com/opentracing/opentracing-go v1.2.0
github.com/prometheus/client_golang v1.11.0
github.com/spf13/cobra v0.0.5
github.com/spf13/cobra v1.2.1
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
google.golang.org/genproto v0.0.0-20210207032614-bba0dbe2a9ea // indirect
google.golang.org/grpc v1.38.0
google.golang.org/protobuf v1.26.0
gotest.tools v2.2.0+incompatible // indirect
)

replace github.com/gitpod-io/gitpod/common-go => ../common-go // leeway
Expand Down
871 changes: 841 additions & 30 deletions components/image-builder-mk3/go.sum

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions components/image-builder-mk3/pkg/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
"encoding/json"
"os"

"github.com/gitpod-io/gitpod/image-builder/api"

"github.com/docker/cli/cli/config/configfile"
"github.com/docker/distribution/reference"
"github.com/docker/docker/api/types"
"github.com/gitpod-io/gitpod/common-go/log"
"golang.org/x/xerrors"

"github.com/gitpod-io/gitpod/common-go/log"
"github.com/gitpod-io/gitpod/image-builder/api"
)

// RegistryAuthenticator can provide authentication for some registries
Expand Down
7 changes: 4 additions & 3 deletions components/image-builder-mk3/pkg/orchestrator/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ import (
"sync"
"time"

"github.com/gitpod-io/gitpod/common-go/log"
"github.com/gitpod-io/gitpod/common-go/tracing"
"github.com/gitpod-io/gitpod/image-builder/api"
wsmanapi "github.com/gitpod-io/gitpod/ws-manager/api"
"github.com/hashicorp/go-retryablehttp"
"golang.org/x/xerrors"

"github.com/gitpod-io/gitpod/common-go/log"
"github.com/gitpod-io/gitpod/common-go/tracing"
"github.com/gitpod-io/gitpod/image-builder/api"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import (
"testing"
"time"

"github.com/gitpod-io/gitpod/image-builder/api"
wsmanapi "github.com/gitpod-io/gitpod/ws-manager/api"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/gitpod-io/gitpod/image-builder/api"
wsmanapi "github.com/gitpod-io/gitpod/ws-manager/api"
)

func TestExtractBuildResponse(t *testing.T) {
Expand Down
16 changes: 8 additions & 8 deletions components/image-builder-mk3/pkg/orchestrator/orchestrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ import (
"sync"
"time"

grpc_opentracing "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
"github.com/opentracing/opentracing-go"
"golang.org/x/xerrors"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/status"

"github.com/gitpod-io/gitpod/common-go/log"
"github.com/gitpod-io/gitpod/common-go/tracing"
csapi "github.com/gitpod-io/gitpod/content-service/api"
Expand All @@ -33,14 +41,6 @@ import (
"github.com/gitpod-io/gitpod/image-builder/pkg/auth"
"github.com/gitpod-io/gitpod/image-builder/pkg/resolve"
wsmanapi "github.com/gitpod-io/gitpod/ws-manager/api"
grpc_opentracing "github.com/grpc-ecosystem/go-grpc-middleware/tracing/opentracing"
"github.com/opentracing/opentracing-go"
"golang.org/x/xerrors"

"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/status"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions components/image-builder-mk3/pkg/resolve/resolve.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import (
"sync"
"time"

"github.com/gitpod-io/gitpod/common-go/log"
"github.com/gitpod-io/gitpod/common-go/tracing"
"github.com/gitpod-io/gitpod/image-builder/pkg/auth"

"github.com/containerd/containerd/remotes"
dockerremote "github.com/containerd/containerd/remotes/docker"
"github.com/docker/distribution/reference"
"github.com/opentracing/opentracing-go"
"golang.org/x/xerrors"

"github.com/gitpod-io/gitpod/common-go/log"
"github.com/gitpod-io/gitpod/common-go/tracing"
"github.com/gitpod-io/gitpod/image-builder/pkg/auth"
)

// ErrNotFound is returned when the reference was not found
Expand Down
3 changes: 2 additions & 1 deletion components/image-builder-mk3/pkg/resolve/resolve_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ import (

"github.com/containerd/containerd/errdefs"
"github.com/containerd/containerd/remotes"
"github.com/gitpod-io/gitpod/image-builder/pkg/resolve"
"github.com/google/go-cmp/cmp"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

"github.com/gitpod-io/gitpod/image-builder/pkg/resolve"
)

func TestStandaloneResolver(t *testing.T) {
Expand Down
7 changes: 6 additions & 1 deletion components/local-app/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,22 @@ require (
github.com/gitpod-io/gitpod/supervisor/api v0.0.0-00010101000000-000000000000
github.com/google/uuid v1.1.2
github.com/improbable-eng/grpc-web v0.14.0
github.com/json-iterator/go v1.1.10 // indirect
github.com/kevinburke/ssh_config v1.1.0
github.com/prometheus/common v0.26.0
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/rs/cors v1.7.0 // indirect
github.com/sirupsen/logrus v1.8.1
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/stretchr/objx v0.1.1 // indirect
github.com/urfave/cli/v2 v2.3.0
github.com/zalando/go-keyring v0.1.1
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a
golang.org/x/oauth2 v0.0.0-20210201163806-010130855d6c
google.golang.org/grpc v1.38.0
google.golang.org/protobuf v1.26.0
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
nhooyr.io/websocket v1.8.7 // indirect
)

Expand Down
Loading