Skip to content

Commit

Permalink
Use latest connect packages (#575)
Browse files Browse the repository at this point in the history
Signed-off-by: Sunghoon Kang <[email protected]>
  • Loading branch information
devholic authored Aug 17, 2023
1 parent 855c5fa commit 3c5885d
Show file tree
Hide file tree
Showing 58 changed files with 479 additions and 257 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ endif
# Note: We use `uname` instead of `go env` because if a developer intends to
# build inside a container, it's possible they may not have Go installed on the
# host machine.
#
#
# This only works on Linux and macOS. Windows users are advised to undertake
# Kargo development activities inside WSL2.
GOOS ?= $(shell uname -s | tr '[:upper:]' '[:lower:]')
Expand Down
12 changes: 8 additions & 4 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@ version: v1
managed:
enabled: true
plugins:
- plugin: buf.build/protocolbuffers/go:v1.30.0
- plugin: buf.build/protocolbuffers/go:v1.31.0
out: pkg/api
opt:
- paths=source_relative
- plugin: buf.build/bufbuild/connect-go:v1.7.0
- plugin: buf.build/connectrpc/go:v1.11.0
out: pkg/api
opt:
- paths=source_relative
- plugin: buf.build/bufbuild/es:v1.2.0
- plugin: buf.build/bufbuild/es:v1.3.0
out: ui/src/gen
opt:
- target=ts
- plugin: buf.build/bufbuild/connect-query:v0.2.1
- plugin: buf.build/bufbuild/connect-es:v0.12.0
out: ui/src/gen
opt:
- target=ts
- plugin: buf.build/bufbuild/connect-query:v0.4.1
out: ui/src/gen
opt:
- target=ts
2 changes: 1 addition & 1 deletion cmd/cli/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"fmt"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"google.golang.org/protobuf/encoding/protojson"
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ require (
golang.org/x/term v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
google.golang.org/grpc v1.55.0
google.golang.org/protobuf v1.30.0
google.golang.org/protobuf v1.31.0
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/api v1.22.4
k8s.io/apiextensions-apiserver v0.25.0 // indirect
Expand All @@ -64,16 +64,17 @@ require (
require k8s.io/apiserver v0.24.2 // indirect

require (
connectrpc.com/connect v1.11.0
connectrpc.com/grpchealth v1.2.0
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/Masterminds/semver v1.5.0
github.com/adrg/xdg v0.4.0
github.com/akuity/bookkeeper v0.1.0-rc.19
github.com/argoproj-labs/argocd-image-updater v0.12.1
github.com/argoproj/argo-cd/v2 v2.6.7
github.com/bacongobbler/browser v1.1.0
github.com/bufbuild/connect-go v1.7.0
github.com/bufbuild/connect-grpchealth-go v1.0.0
github.com/coreos/go-oidc/v3 v3.6.0
github.com/evanphx/json-patch/v5 v5.6.0
github.com/golang-jwt/jwt/v5 v5.0.0
github.com/kelseyhightower/envconfig v1.4.0
github.com/samber/mo v1.8.0
Expand Down Expand Up @@ -121,7 +122,6 @@ require (
github.com/docker/go-units v0.4.0 // indirect
github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
github.com/fatih/camelcase v1.0.0 // indirect
github.com/felixge/httpsnoop v1.0.3 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo
cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
connectrpc.com/connect v1.11.0 h1:Av2KQXxSaX4vjqhf5Cl01SX4dqYADQ38eBtr84JSUBk=
connectrpc.com/connect v1.11.0/go.mod h1:3AGaO6RRGMx5IKFfqbe3hvK1NqLosFNP2BxDYTPmNPo=
connectrpc.com/grpchealth v1.2.0 h1:aHP33Bki+F2jPNI1mFVSFG7v0qJrgmfbg7X7nOdSj0M=
connectrpc.com/grpchealth v1.2.0/go.mod h1:fZos12C4p/ZaZC6OwBGZUM+i/fhnRhv75ax/6V/zIeM=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20201218220906-28db891af037/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ=
Expand Down Expand Up @@ -194,10 +198,6 @@ github.com/bradleyfalzon/ghinstallation/v2 v2.1.0 h1:5+NghM1Zred9Z078QEZtm28G/kf
github.com/bradleyfalzon/ghinstallation/v2 v2.1.0/go.mod h1:Xg3xPRN5Mcq6GDqeUVhFbjEWMb4JHCyWEeeBGEYQoTU=
github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70=
github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk=
github.com/bufbuild/connect-go v1.7.0 h1:MGp82v7SCza+3RhsVhV7aMikwxvI3ZfD72YiGt8FYJo=
github.com/bufbuild/connect-go v1.7.0/go.mod h1:GmMJYR6orFqD0Y6ZgX8pwQ8j9baizDrIQMm1/a6LnHk=
github.com/bufbuild/connect-grpchealth-go v1.0.0 h1:33v883tL86jLomQT6R2ZYVYaI2cRkuUXvU30WfbQ/ko=
github.com/bufbuild/connect-grpchealth-go v1.0.0/go.mod h1:6OEb4J3rh5+Wdvt4/muOIfZo1lt9cPU8ggwpsjBaZ3Y=
github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng=
github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8=
github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ=
Expand Down Expand Up @@ -1741,8 +1741,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=
google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
2 changes: 1 addition & 1 deletion internal/api/grpc_health.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package api

import (
grpchealth "github.com/bufbuild/connect-grpchealth-go"
grpchealth "connectrpc.com/grpchealth"
)

func NewHealthChecker() grpchealth.Checker {
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/admin_login_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"time"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/golang-jwt/jwt/v5"
"github.com/pkg/errors"
uuid "github.com/satori/go.uuid"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/create_project_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"strings"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
"google.golang.org/protobuf/types/known/timestamppb"
corev1 "k8s.io/api/core/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/create_promotion_policy_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
kubeerr "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/create_stage_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
kubeerr "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/delete_project_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"strings"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
kubeerr "k8s.io/apimachinery/pkg/api/errors"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/delete_promotion_policy_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
kubeerr "k8s.io/apimachinery/pkg/api/errors"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/delete_stage_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
kubeerr "k8s.io/apimachinery/pkg/api/errors"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/get_promotion_policy_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
kubeerr "k8s.io/apimachinery/pkg/api/errors"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/get_public_config_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"

"github.com/akuity/kargo/internal/api/config"
svcv1alpha1 "github.com/akuity/kargo/pkg/api/service/v1alpha1"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/get_stage_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
kubeerr "k8s.io/apimachinery/pkg/api/errors"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/get_stage_v1alpha1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/stretchr/testify/require"
corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/get_version_info_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"

typesv1alpha1 "github.com/akuity/kargo/internal/api/types/v1alpha1"
"github.com/akuity/kargo/internal/version"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/list_projects_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"google.golang.org/protobuf/types/known/timestamppb"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/labels"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/list_promotion_policies_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
"sigs.k8s.io/controller-runtime/pkg/client"

Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/list_stages_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
"sigs.k8s.io/controller-runtime/pkg/client"

Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/list_stages_v1alpha1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/stretchr/testify/require"
corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/controller-runtime/pkg/client/fake"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/promote_stage_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"fmt"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
kubeerr "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/promote_stage_v1alpha1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"testing"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/stretchr/testify/require"
corev1 "k8s.io/api/core/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/update_promotion_policy_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
kubeerr "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/update_stage_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
kubeerr "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/util/validation/field"
"sigs.k8s.io/controller-runtime/pkg/client"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/handler/watch_stage_v1alpha1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package handler
import (
"context"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/pkg/errors"
kubeerr "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/option/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"strings"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"

"github.com/akuity/kargo/internal/kubeclient"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/api/option/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http/httptest"
"testing"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"google.golang.org/grpc/health/grpc_health_v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/option/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package option
import (
"fmt"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/api/option/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path"
"time"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
log "github.com/sirupsen/logrus"

"github.com/akuity/kargo/internal/logging"
Expand Down
4 changes: 2 additions & 2 deletions internal/api/option/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net/http/httptest"
"testing"

"github.com/bufbuild/connect-go"
grpchealth "github.com/bufbuild/connect-grpchealth-go"
"connectrpc.com/connect"
grpchealth "connectrpc.com/grpchealth"
testlog "github.com/sirupsen/logrus/hooks/test"
"github.com/stretchr/testify/require"
"google.golang.org/grpc/health/grpc_health_v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/option/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"net/http"

"github.com/bufbuild/connect-go"
"connectrpc.com/connect"
log "github.com/sirupsen/logrus"

"github.com/akuity/kargo/internal/logging"
Expand Down
4 changes: 2 additions & 2 deletions internal/api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
goos "os"
"time"

"github.com/bufbuild/connect-go"
grpchealth "github.com/bufbuild/connect-grpchealth-go"
"connectrpc.com/connect"
grpchealth "connectrpc.com/grpchealth"
"github.com/pkg/errors"
"golang.org/x/net/http2"
"golang.org/x/net/http2/h2c"
Expand Down
Loading

0 comments on commit 3c5885d

Please sign in to comment.