Navigation Menu

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

Use updated urfave/cli to generate man pages #3637

Merged
merged 1 commit into from Sep 11, 2019

Conversation

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

theopenlab-ci bot commented Sep 10, 2019

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 10, 2019

Build succeeded.

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 10, 2019

Build succeeded.

ctr is an unsupported debug and administrative client for interacting
with the containerd daemon. Because it is unsupported, the commands,
options, and operations are not guaranteed to be backward compatible or
stable from release to release of the containerd project.`
Copy link
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?

@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 11, 2019

Build succeeded.

@estesp
Copy link
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 <crosbymichael@gmail.com>
@theopenlab-ci
Copy link

theopenlab-ci bot commented Sep 11, 2019

Build succeeded.

@codecov-io
Copy link

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
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
Member Author

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

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

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
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 <eli.uriegas@docker.com>
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 <eli.uriegas@docker.com>
(cherry picked from commit 036db34)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
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 <eli.uriegas@docker.com>
(cherry picked from commit 036db34)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
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 <eli.uriegas@docker.com>
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

5 participants