Skip to content

Use updated urfave/cli to generate man pages#3637

Merged
dmcgowan merged 1 commit intocontainerd:masterfrom
crosbymichael:manpages
Sep 11, 2019
Merged

Use updated urfave/cli to generate man pages#3637
dmcgowan merged 1 commit intocontainerd:masterfrom
crosbymichael:manpages

Conversation

@crosbymichael
Copy link
Copy Markdown
Member

This will generate man pages based on the cli apps. It adds an extra command to each of the binaries that we need man pages for and it generates them in markdown format first so that we can add additional pages.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Sep 10, 2019

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Sep 10, 2019

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Sep 10, 2019

Build succeeded.

Comment thread cmd/ctr/app/main.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we add the same description to containerd-stress?

@crosbymichael crosbymichael force-pushed the manpages branch 2 times, most recently from 4df976d to e1ed190 Compare September 11, 2019 18:02
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Sep 11, 2019

Build succeeded.

@estesp
Copy link
Copy Markdown
Member

estesp commented Sep 11, 2019

For some reason the vendor check is failing with modified files when vndr is run via Travis?

The climan package has a command that can be registered with any urfav
cli app to generate man pages.

Signed-off-by: Michael Crosby <[email protected]>
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Sep 11, 2019

Build succeeded.

@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #3637 into master will decrease coverage by 5.09%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #3637     +/-   ##
=========================================
- Coverage   42.39%   37.29%   -5.1%     
=========================================
  Files         127       85     -42     
  Lines       14048    11721   -2327     
=========================================
- Hits         5955     4371   -1584     
+ Misses       7193     6737    -456     
+ Partials      900      613    -287
Flag Coverage Δ
#linux ?
#windows 37.29% <ø> (+0.01%) ⬆️
Impacted Files Coverage Δ
archive/tar_opts.go 11.76% <0%> (-47.06%) ⬇️
cio/io.go 1.4% <0%> (-45.08%) ⬇️
snapshots/native/native.go 1.79% <0%> (-41.26%) ⬇️
archive/tar.go 18.95% <0%> (-29.24%) ⬇️
metadata/snapshot.go 23.86% <0%> (-24.05%) ⬇️
oci/spec_opts.go 28.28% <0%> (-2.33%) ⬇️
content/local/writer.go 57.69% <0%> (-0.97%) ⬇️
mount/temp_unix.go
sys/reaper_linux.go
services/server/server_linux.go
... and 39 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d8ad1bd...f3a5b8c. Read the comment docs.

@estesp
Copy link
Copy Markdown
Member

estesp commented Sep 11, 2019

To make the Makefile target genman work "out of the box" we would have to vendor go-md2man:

16:22 $ make genman
+ bin/ctr
vendor/github.com/urfave/cli/docs.go:11:2: cannot find package "github.com/cpuguy83/go-md2man/v2/md2man" in any of:
        /home/estesp/go/src/github.com/containerd/containerd/vendor/github.com/cpuguy83/go-md2man/v2/md2man (vendor tree)
        /snap/go/4301/src/github.com/cpuguy83/go-md2man/v2/md2man (from $GOROOT)
        /home/estesp/go/src/github.com/cpuguy83/go-md2man/v2/md2man (from $GOPATH)
Makefile:183: recipe for target 'bin/ctr' failed
make: *** [bin/ctr] Error 1

This works fine for CI because we manually enforce this with our setup scripts. I guess in that sense it is a developer dependency if they want to work on manpages? Maybe that's reasonable?

@crosbymichael
Copy link
Copy Markdown
Member Author

Yes, it should be no different than today if you wanted to generate the manpages.

Copy link
Copy Markdown
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

Not as beautiful as handcrafted, artisanal manpages, but the machines are getting better these days. It works! :)

@dmcgowan dmcgowan added this to the 1.3 milestone Sep 11, 2019
Copy link
Copy Markdown
Member

@dmcgowan dmcgowan left a comment

Choose a reason for hiding this comment

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

LGTM

@dmcgowan dmcgowan merged commit d3ccbc6 into containerd:master Sep 11, 2019
seemethere added a commit to seemethere/containerd that referenced this pull request Oct 8, 2019
Seems to be that docs/man/ctr.1.md and docs/man/containerd.1.md were
removed in containerd#3637 and were not updated correctly in the Makefile, leading
to build failures like:

    + make man

    make: *** No rule to make target `man/ctr.1', needed by `man'.  Stop.

Changes the gen-manpages command to be specific on which manpages are to
be generated.

Signed-off-by: Eli Uriegas <[email protected]>
seemethere added a commit to seemethere/containerd that referenced this pull request Oct 11, 2019
Seems to be that docs/man/ctr.1.md and docs/man/containerd.1.md were
removed in containerd#3637 and were not updated correctly in the Makefile, leading
to build failures like:

    + make man

    make: *** No rule to make target `man/ctr.1', needed by `man'.  Stop.

Changes the gen-manpages command to be specific on which manpages are to
be generated.

Signed-off-by: Eli Uriegas <[email protected]>
(cherry picked from commit 036db34)
Signed-off-by: Eli Uriegas <[email protected]>
erikwilson pushed a commit to erikwilson/rancher-containerd that referenced this pull request Oct 23, 2019
Seems to be that docs/man/ctr.1.md and docs/man/containerd.1.md were
removed in containerd#3637 and were not updated correctly in the Makefile, leading
to build failures like:

    + make man

    make: *** No rule to make target `man/ctr.1', needed by `man'.  Stop.

Changes the gen-manpages command to be specific on which manpages are to
be generated.

Signed-off-by: Eli Uriegas <[email protected]>
(cherry picked from commit 036db34)
Signed-off-by: Eli Uriegas <[email protected]>
tussennet pushed a commit to tussennet/containerd that referenced this pull request Sep 11, 2020
Seems to be that docs/man/ctr.1.md and docs/man/containerd.1.md were
removed in containerd#3637 and were not updated correctly in the Makefile, leading
to build failures like:

    + make man

    make: *** No rule to make target `man/ctr.1', needed by `man'.  Stop.

Changes the gen-manpages command to be specific on which manpages are to
be generated.

Signed-off-by: Eli Uriegas <[email protected]>
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.

5 participants