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

vendor: github.com/urfave/cli v1.22.9 and fix "verify-vendor" script #6997

Merged
merged 2 commits into from May 27, 2022

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented May 27, 2022

fix verify-vendor if go.mod does not contain replace rules

Before this patch, if the go.mod did not contain a replace rule, jq would fail
(Cannot iterate over null), and Bash would produce an error when trying to add
an empty $key to map_requires:

make verify-vendor
+ verify-vendor
  jq: error (at <stdin>:581): Cannot iterate over null (null)
  /go/src/github.com/containerd/containerd//script/verify-go-modules.sh: line 44: map_replaces_1[$key]: bad array subscript
  make: *** [Makefile:435: verify-vendor] Error 1

vendor: github.com/urfave/cli v1.22.9

The regression in v1.22.2 has been resolved, so we can drop the
replace rule and use the latest v1.22.x version.

full diff: urfave/cli@v1.22.1...v1.22.9

@thaJeztah
Copy link
Member Author

I'll work on a follow-up to this one to see if we can make use of the new urfave_cli_no_docs build-tag as well (see urfave/cli#1383)

@thaJeztah
Copy link
Member Author

Hmm... what's this error?

+ verify-vendor
go: downloading github.com/Microsoft/hcsshim/test v0.0.0-20210408205431-da33ecd607e1
jq: error (at <stdin>:581): Cannot iterate over null (null)
/home/runner/work/containerd/containerd/src/github.com/containerd/containerd//script/verify-go-modules.sh: line 44: map_replaces_1[$key]: bad array subscript
Makefile:422: recipe for target 'verify-vendor' failed
make: *** [verify-vendor] Error 1

Before this patch, if the go.mod did not contain a replace rule, jq would fail
(Cannot iterate over null), and Bash would produce an error when trying to add
an empty `$key` to `map_requires`:

    make verify-vendor
    + verify-vendor
      jq: error (at <stdin>:581): Cannot iterate over null (null)
      /go/src/github.com/containerd/containerd//script/verify-go-modules.sh: line 44: map_replaces_1[$key]: bad array subscript
      make: *** [Makefile:435: verify-vendor] Error 1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah changed the title vendor: github.com/urfave/cli v1.22.9 vendor: github.com/urfave/cli v1.22.9 and fix "verify-vendor" script May 27, 2022
The regression in v1.22.2 has been resolved, so we can drop the
replace rule and use the latest v1.22.x version.

full diff: urfave/cli@v1.22.1...v1.22.9

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

Pushed a commit to fix the vendor check

@thaJeztah
Copy link
Member Author

Failures should probably not be related (as #6998 went green); let me close/reopen to trigger CI

@thaJeztah thaJeztah closed this May 27, 2022
@thaJeztah thaJeztah reopened this May 27, 2022
@thaJeztah
Copy link
Member Author

Hmm.. that didn't seem to trigger the cirrus jobs (which were the ones failing); perhaps it's just slow to report, so let's see

Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM 🎉 (nice to see the replace rules disappearing!)

@kzys kzys merged commit c76559a into containerd:main May 27, 2022
@thaJeztah thaJeztah deleted the update_urfave branch May 27, 2022 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants