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

chore: align dependencies with Knative #1942

Merged
merged 4 commits into from
Aug 29, 2023
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 11 additions & 3 deletions cmd/config_labels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ import (
"time"

"github.com/Netflix/go-expect"
"github.com/creack/pty"
"github.com/hinshun/vt10x"
"github.com/spf13/cobra"

fn "knative.dev/func/pkg/functions"
)

Expand Down Expand Up @@ -41,11 +43,17 @@ func createRunFunc(cmd *cobra.Command, t *testing.T) func(subcmd string, input .
return func(subcmd string, input ...string) {

ctx := context.Background()
c, _, err := vt10x.NewVT10XConsole()

ptm, pts, err := pty.Open()
if err != nil {
t.Fatal(err)
}
term := vt10x.New(vt10x.WithWriter(pts))
c, err := expect.NewConsole(expect.WithStdin(ptm), expect.WithStdout(term), expect.WithCloser(ptm, pts))
if err != nil {
t.Fatal(err)
}
defer c.Close()
t.Cleanup(func() { c.Close() })

var wg sync.WaitGroup
wg.Add(1)
Expand Down Expand Up @@ -147,7 +155,7 @@ func TestListLabels(t *testing.T) {
cmd.SetArgs([]string{})

ctx := context.Background()
c, _, err := vt10x.NewVT10XConsole()
c, err := expect.NewConsole()
if err != nil {
t.Fatal(err)
}
Expand Down
11 changes: 9 additions & 2 deletions cmd/prompt/prompt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"testing"
"time"

"github.com/Netflix/go-expect"
"github.com/creack/pty"
"github.com/hinshun/vt10x"

"knative.dev/func/pkg/docker"
Expand All @@ -24,11 +26,16 @@ func Test_NewPromptForCredentials(t *testing.T) {
Password: "testpwd",
}

console, _, err := vt10x.NewVT10XConsole()
ptm, pts, err := pty.Open()
if err != nil {
t.Fatal(err)
}
defer console.Close()
term := vt10x.New(vt10x.WithWriter(pts))
console, err := expect.NewConsole(expect.WithStdin(ptm), expect.WithStdout(term), expect.WithCloser(ptm, pts))
if err != nil {
t.Fatal(err)
}
t.Cleanup(func() { console.Close() })

go func() {
_, _ = console.ExpectEOF()
Expand Down
51 changes: 20 additions & 31 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ module knative.dev/func

go 1.20

replace (
// Use older version since it checks ~/.docker/config.json for credentials as opposed to later versions
github.com/containers/image/v5 => github.com/containers/image/v5 v5.23.1

// Pin k8s.io dependencies to align with Knative and Tekton needs
k8s.io/api => k8s.io/api v0.26.5
k8s.io/apimachinery => k8s.io/apimachinery v0.26.5
k8s.io/client-go => k8s.io/client-go v0.26.5
matejvasek marked this conversation as resolved.
Show resolved Hide resolved
)

require (
github.com/AlecAivazis/survey/v2 v2.3.6
github.com/Masterminds/semver v1.5.0
Expand All @@ -13,6 +23,7 @@ require (
github.com/containerd/containerd v1.7.2
github.com/containers/image/v5 v5.26.1
github.com/coreos/go-semver v0.3.0
github.com/creack/pty v1.1.18
github.com/docker/cli v24.0.2+incompatible
github.com/docker/docker v24.0.5-0.20230718221249-d4a26c153000+incompatible
github.com/docker/docker-credential-helpers v0.7.0
Expand All @@ -25,6 +36,8 @@ require (
github.com/google/uuid v1.3.0
github.com/heroku/color v0.0.6
github.com/hinshun/vt10x v0.0.0-20220228203356-1ab2cad5fd82
github.com/manifestival/client-go-client v0.5.0
github.com/manifestival/manifestival v0.7.2
github.com/opencontainers/image-spec v1.1.0-rc4
github.com/openshift-pipelines/pipelines-as-code v0.17.1
github.com/openshift/source-to-image v1.3.8
Expand All @@ -44,6 +57,7 @@ require (
golang.org/x/sync v0.3.0
golang.org/x/term v0.11.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
gotest.tools/v3 v3.4.0
k8s.io/api v0.26.5
k8s.io/apimachinery v0.26.5
Expand All @@ -56,17 +70,6 @@ require (
)

require (
github.com/OneOfOne/xxhash v1.2.8 // indirect
github.com/moby/patternmatcher v0.5.0 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 // indirect
sigs.k8s.io/controller-runtime v0.7.2 // indirect
)

require (
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect
contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect
Expand All @@ -80,6 +83,7 @@ require (
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/OneOfOne/xxhash v1.2.8 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230518184743-7afd39499903 // indirect
github.com/acomagu/bufpipe v1.0.4 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
Expand Down Expand Up @@ -114,7 +118,6 @@ require (
github.com/containerd/typeurl v1.0.2 // indirect
github.com/containers/storage v1.48.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/creack/pty v1.1.18 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgraph-io/ristretto v0.0.1 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
Expand Down Expand Up @@ -168,13 +171,10 @@ require (
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.16.6 // indirect
github.com/kr/pty v1.1.8 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/manifestival/client-go-client v0.5.0
github.com/manifestival/manifestival v0.7.2
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
Expand All @@ -185,8 +185,10 @@ require (
github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/buildkit v0.11.6 // indirect
github.com/moby/patternmatcher v0.5.0 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/sys/mountinfo v0.6.2 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
Expand Down Expand Up @@ -239,36 +241,23 @@ require (
google.golang.org/api v0.138.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230803162519-f966b187b2e5 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230807174057-1744710a1577 // indirect
google.golang.org/grpc v1.57.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1
k8s.io/apiextensions-apiserver v0.26.5 // indirect
k8s.io/cli-runtime v0.25.9 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect
k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 // indirect
knative.dev/networking v0.0.0-20230817140742-4bfcc9fb6012 // indirect
sigs.k8s.io/controller-runtime v0.7.2 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/api v0.12.1 // indirect
sigs.k8s.io/kustomize/kyaml v0.13.9 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace (
// Version used in Eventing
github.com/cloudevents/sdk-go/sql/v2 => github.com/cloudevents/sdk-go/sql/v2 v2.0.0-20220930150014-52b12276cc4a

// Use older version since it checks ~/.docker/config.json for credentials as opposed to later versions
github.com/containers/image/v5 => github.com/containers/image/v5 v5.23.1

// Tekton CLI uses newer version without currently used constructor code
github.com/hinshun/vt10x => github.com/hinshun/vt10x v0.0.0-20180809195222-d55458df857c
// Pin k8s.io dependencies to align with Knative and Tekton needs
k8s.io/api => k8s.io/api v0.25.4
k8s.io/apimachinery => k8s.io/apimachinery v0.25.4
k8s.io/client-go => k8s.io/client-go v0.25.4
)
Loading
Loading