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

Updates spf13/cobra dep to v0.0.5 #443

Merged
merged 3 commits into from
Oct 30, 2019

Conversation

navidshaikh
Copy link
Collaborator

@navidshaikh navidshaikh commented Oct 11, 2019

Fixes #426

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Oct 11, 2019
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: navidshaikh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 11, 2019
@knative-prow-robot knative-prow-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 11, 2019
@navidshaikh
Copy link
Collaborator Author

➜  client git:(pr/update-cobra) source <(kn completion --zsh)     
compdef _kn kn  
➜  client git:(pr/update-cobra) kn service
create    -- Create a service.
delete    -- Delete a service.
describe  -- Show details for a given service
list      -- List available services.
update    -- Update a service.

@navidshaikh
Copy link
Collaborator Author

/hold

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 11, 2019
Copy link
Contributor

@maximilien maximilien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ok-to-test

@knative-prow-robot knative-prow-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Oct 11, 2019
go.mod Outdated
@@ -29,3 +29,5 @@ require (
knative.dev/test-infra v0.0.0-20190730202142-17f2331e80ad
sigs.k8s.io/yaml v1.1.0
)

replace github.com/spf13/cobra => github.com/chmouel/cobra v0.0.0-20190820110723-8f09bb39b20d
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can we track that we remove the temporary replacement when the next cobra release is out ?

otherwise I think its ok for me to include this bug-fix release here (it's about escaping [ in the help message, right ?)

But we should decide first on #439 which direction we want to go.

Copy link
Collaborator Author

@navidshaikh navidshaikh Oct 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't track that, we can open a ticket though in client to switch to spf13/cobra and we could cross check part of triaging client issues.

otherwise I think its ok for me to include this bug-fix release here (it's about escaping [ in the help message, right ?)

Yes.

About the comment on #439

if we don't use [ in our help messages)

There are some flags we inherit for machine readable output like --template whose help text we don't control. :-/

About using cobra from forked bug fix branch, I'd have deferred it if cobra PR turn around is quicker, apparently the PR from Chmouel is open since a while and this ended up even tkn using the fork of cobra.

@rhuss
Copy link
Contributor

rhuss commented Oct 23, 2019

@navidshaikh oops, I tried to resolve the conflict in go.mod via the github UI, but probably did something wrong. Could you please have a quick look ? Should not be hard to fix.

@navidshaikh
Copy link
Collaborator Author

/retest

@navidshaikh
Copy link
Collaborator Author

Cross platform build failing with go: error loading module requirements, though it works locally for me. 🤔

@rhuss
Copy link
Contributor

rhuss commented Oct 23, 2019

hmm, let me check that later today.

@rhuss
Copy link
Contributor

rhuss commented Oct 24, 2019

@navidshaikh Looks like that the revision oc @chmouel fork is not available anymore but you had still a cache version.

For me it is

go: finding github.com/chmouel/cobra v0.0.0-20190820110723-8f09bb39b20d
go: github.com/chmouel/cobra@v0.0.0-20190820110723-8f09bb39b20d: unknown revision 8f09bb39b20d
go: error loading module requirements

@chmouel
Copy link

chmouel commented Oct 24, 2019

Oops sorry about this guys, i'll make sure to update the forks in a backward compatible way and ping you all before doing it,

@chmouel
Copy link

chmouel commented Oct 24, 2019

and fyi it's a security release, viper 1.4.0 ie (spf13/cobra#978) you may want to mention it in your release changes

 Fixes knative#426

 - and a couple of patches on top which aren't merged yet
 	- spf13/cobra#884
	- spf13/cobra#899
 - also updates viper to 1.4.0
@navidshaikh
Copy link
Collaborator Author

Builds fine on my local machine, tried removing the cached version of vendored deps and re-populate it as well, but the build tests are failing in CI prompting

+golang.org/x/tools v0.0.0-20190311212946-11955173bddd h1:/e+gpKk9r3dJobndpTytxS2gOy6m5uvpg+ISQoEcusQ=
[..]
ERROR: /home/prow/go/src/knative.dev/client is out of date. Please run ./hack/build.sh -c and commit.

It reports that additional line in go.sum is missing from the PR change-set, running ./hack/build.sh -c locally doesn't add it locally. Could add that line in go.sum to pass the build tests.Happy to learn more about this if someone has insight on go modules.

@rhuss
Copy link
Contributor

rhuss commented Oct 29, 2019

@navidshaikh I think it also depends on the go version you are using, as go mod is an intrinsic part of the go tool suite and hence the outcome also depends on whether you are using e.g. go 1.12 or go 1.13.

It's really something that we also should nail down when doing such sort of picky comparisons, like for that dep check. Not sure if go allows for fixing a 'format version' or if such thing just can slip through.

@navidshaikh could you check which go version is used on CI and which on your local machine, and if that differs, try locally with the same go version as on prow ?

@navidshaikh
Copy link
Collaborator Author

Local:

✗ go version
go version go1.12.9 linux/amd64

On the prow side, it doesn't print the Z stream version for go though

>> go version
go version go1.12 linux/amd64

@rhuss
Copy link
Contributor

rhuss commented Oct 29, 2019

hmm. Then it looks like that something other is different local vs server side. Let me check that, too.

@rhuss
Copy link
Contributor

rhuss commented Oct 29, 2019

I did some investigations on the go.sum issue. It turns out that hack/verify-codegen.sh calls internally (and uncoditionally) go install golang.org/x/tools/cmd/goimports. And this modifies go.sum (and is also the reason why there are so many golang.org/x/tools entries, as this list grows with new commits in the goimports repository)

Let me try to fix that in a subsequent PR. @navidshaikh for now, just run go install /Users/roland/Development/go/workspace/bin/goimports yourself and commit.

Some good go mod references I've met on the way:

 as a result of `go install golang.org/x/tools/cmd/goimports`
@navidshaikh
Copy link
Collaborator Author

Thanks @rhuss! I've updated the PR.

@navidshaikh
Copy link
Collaborator Author

/hold cancel

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 29, 2019
@rhuss
Copy link
Contributor

rhuss commented Oct 30, 2019

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 30, 2019
@navidshaikh
Copy link
Collaborator Author

/retest

@knative-prow-robot knative-prow-robot merged commit dd5b05c into knative:master Oct 30, 2019
coryrc pushed a commit to coryrc/client that referenced this pull request May 14, 2020
* this is to create tools/infra oncall.html which will be accessible to OSS community.

* Fix whitespaces

* remove static mapping

* remove static mapping
navidshaikh added a commit to navidshaikh/client that referenced this pull request Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zsh completion gives errors
6 participants