Skip to content

Commit

Permalink
Update cli-utils and klog dependencies (#2151)
Browse files Browse the repository at this point in the history
  • Loading branch information
mortent committed Jun 7, 2021
1 parent ad87e13 commit aafba55
Show file tree
Hide file tree
Showing 17 changed files with 254 additions and 167 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/checkLicenses.yml
Expand Up @@ -27,10 +27,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go 1.15
- name: Set up Go 1.16
uses: actions/setup-go@v1
with:
go-version: 1.15
go-version: 1.16
- run: |
./scripts/create-licenses.sh
# Upload the licenses list so it's available if needed
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Expand Up @@ -28,10 +28,10 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.15
- name: Set up Go 1.16
uses: actions/setup-go@v1
with:
go-version: 1.15
go-version: 1.16
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.15
go-version: 1.16
- name: Checkout
uses: actions/checkout@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verifyContent.yml
Expand Up @@ -26,7 +26,7 @@ jobs:
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.14
go-version: 1.16
- uses: actions/checkout@v2
- run: |
make build
Expand Down
2 changes: 1 addition & 1 deletion commands/livecmd.go
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/GoogleContainerTools/kpt/thirdparty/cli-utils/status"
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/klog"
"k8s.io/klog/v2"
cluster "k8s.io/kubectl/pkg/cmd/util"
"sigs.k8s.io/cli-utils/pkg/manifestreader"
"sigs.k8s.io/cli-utils/pkg/provider"
Expand Down
2 changes: 1 addition & 1 deletion e2e/testdata/fn-eval/error-in-pipe/.expected/config.yaml
Expand Up @@ -23,4 +23,4 @@ stdErr: |2-
[FAIL] "gcr.io/kpt-fn/dne"
error: Function image "gcr.io/kpt-fn/dne" doesn't exist
Error: Function image "gcr.io/kpt-fn/dne" doesn't exist
30 changes: 11 additions & 19 deletions go.mod
@@ -1,33 +1,25 @@
module github.com/GoogleContainerTools/kpt

go 1.14
go 1.16

require (
github.com/cpuguy83/go-md2man/v2 v2.0.0
github.com/go-errors/errors v1.0.1
github.com/go-errors/errors v1.4.0
github.com/igorsobreira/titlecase v0.0.0-20140109233139-4156b5b858ac
github.com/philopon/go-toposort v0.0.0-20170620085441-9be86dbd762f
github.com/posener/complete/v2 v2.0.1-alpha.12
github.com/spf13/cobra v1.1.1
github.com/spf13/cobra v1.1.3
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.6.1
github.com/stretchr/testify v1.7.0
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
gotest.tools v2.2.0+incompatible
k8s.io/apiextensions-apiserver v0.18.10
k8s.io/apimachinery v0.21.0
k8s.io/cli-runtime v0.21.0
k8s.io/client-go v0.21.0
k8s.io/klog v1.0.0
k8s.io/kubectl v0.21.0
sigs.k8s.io/cli-utils v0.25.1-0.20210521231537-8200fe56434d
k8s.io/apiextensions-apiserver v0.21.1
k8s.io/apimachinery v0.21.1
k8s.io/cli-runtime v0.21.1
k8s.io/client-go v0.21.1
k8s.io/klog/v2 v2.9.0
k8s.io/kubectl v0.21.1
sigs.k8s.io/cli-utils v0.25.1-0.20210603052138-670dee18a123
sigs.k8s.io/kustomize/kyaml v0.10.20-0.20210506224302-fcfdf6be5152
)

// TODO: sigs.k8s.io/cli-utils@v0.25.0 is still using old version of cli-runtime
// and kubectl and ultimately depends on old version of kustomize which will make
// license check fail
replace (
k8s.io/cli-runtime v0.20.4 => k8s.io/cli-runtime v0.21.0
k8s.io/kubectl v0.20.4 => k8s.io/kubectl v0.21.0
)
356 changes: 225 additions & 131 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internal/cmdmigrate/migratecmd.go
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/klog"
"k8s.io/klog/v2"
"k8s.io/kubectl/pkg/util/i18n"
"sigs.k8s.io/cli-utils/pkg/common"
"sigs.k8s.io/cli-utils/pkg/config"
Expand Down
3 changes: 2 additions & 1 deletion internal/fnruntime/container.go
Expand Up @@ -224,7 +224,8 @@ type ContainerImageError struct {
}

func (e *ContainerImageError) Error() string {
//nolint:lll
return fmt.Sprintf(
"Function image %q doesn't exist remotely. If you are developing new functions locally, you can choose to set the image pull policy to ifNotPresent or never.\n%v",
"Error: Function image %q doesn't exist remotely. If you are developing new functions locally, you can choose to set the image pull policy to ifNotPresent or never.\n%v",
e.Image, e.Output)
}
2 changes: 1 addition & 1 deletion main.go
Expand Up @@ -30,7 +30,7 @@ import (
"github.com/GoogleContainerTools/kpt/run"
"github.com/spf13/cobra"
_ "k8s.io/client-go/plugin/pkg/client/auth"
"k8s.io/klog"
"k8s.io/klog/v2"
k8scmdutil "k8s.io/kubectl/pkg/cmd/util"
"k8s.io/kubectl/pkg/util/logs"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/kptfile/v1alpha2/validation.go
Expand Up @@ -83,7 +83,7 @@ func (f *Function) validate(fnType string, idx int, pkgPath types.UniquePath) er
Reason: err.Error(),
}
}
if _ , err := GetValidatedFnConfigFromPath(pkgPath, f.ConfigPath); err != nil {
if _, err := GetValidatedFnConfigFromPath(pkgPath, f.ConfigPath); err != nil {
return &ValidateError{
Field: fmt.Sprintf("pipeline.%s[%d].configPath", fnType, idx),
Value: f.ConfigPath,
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/kptfile/v1alpha2/validation_test.go
Expand Up @@ -38,7 +38,7 @@ func TestKptfileValidate(t *testing.T) {
Pipeline: &Pipeline{
Mutators: []Function{
{
Image: "patch-strategic-merge",
Image: "patch-strategic-merge",
},
{
Image: "gcr.io/kpt-fn/set-annotations:v0.1",
Expand Down
2 changes: 1 addition & 1 deletion pkg/live/inventoryrg.go
Expand Up @@ -24,7 +24,7 @@ import (
"k8s.io/apimachinery/pkg/api/meta"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/klog"
"k8s.io/klog/v2"
cmdutil "k8s.io/kubectl/pkg/cmd/util"
"sigs.k8s.io/cli-utils/pkg/apply/event"
"sigs.k8s.io/cli-utils/pkg/apply/taskrunner"
Expand Down
2 changes: 1 addition & 1 deletion pkg/live/rgpath_test.go
Expand Up @@ -125,7 +125,7 @@ func TestPathManifestReader_Read(t *testing.T) {
"cr.yaml": cr,
},
namespace: "test-namespace",
expectedErrMsg: "can't find scope for resource Custom.custom.io cr",
expectedErrMsg: "unknown resource types: Custom.custom.io",
},
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/live/rgstream_test.go
Expand Up @@ -99,7 +99,7 @@ func TestResourceStreamManifestReader_Read(t *testing.T) {
"cr.yaml": cr,
},
namespace: "test-namespace",
expectedErrMsg: "can't find scope for resource Custom.custom.io cr",
expectedErrMsg: "unknown resource types: Custom.custom.io",
},
}

Expand Down
2 changes: 1 addition & 1 deletion thirdparty/cli-utils/printers/table/collector.go
Expand Up @@ -7,7 +7,7 @@ import (
"sort"
"sync"

"k8s.io/klog"
"k8s.io/klog/v2"
"sigs.k8s.io/cli-utils/pkg/apply/event"
pe "sigs.k8s.io/cli-utils/pkg/kstatus/polling/event"
"sigs.k8s.io/cli-utils/pkg/kstatus/status"
Expand Down

0 comments on commit aafba55

Please sign in to comment.