-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[CI:DOCS] Man pages: check for corrupt tables #19278
[CI:DOCS] Man pages: check for corrupt tables #19278
Conversation
Every so often we hear reports of a corrupt man page table, where columns are misaligned in nonsensical ways. The traditional symptom looks like: |----------------|--------------| | option name | | |----------------|--------------| | | description | |----------------|--------------| Cause: one of the tools in the man page generation chain, maybe 'man' itself, has an undocumented length limit on table cells, _and_ an undocumented page width as well. If you exceed these undocumented limits, you get corrupt man pages. Silently. This adds a horrible test for those. And I mean horrible: - unreadable - unmaintainable - unreliable (heuristic, no guarantees) - slows down 'make docs' (less than a second, but still) I've tested by adding long '| sdf sdf | dsf |' rows to a few man pages, and it triggers. That's the only good thing I can say about it. Other approaches I tried: - man -l -Tascii | grep non-ascii-art - man -l ... 2>&1 | grep "table wider than" - perusing the generated .1/.5 pages, seeing if my eye can detect something different about too-long cells - same, using 'tbl' - checking for too-long cells in the source document ...and more that I've forgotten. This was the only way that produced reliable errors. If you have a better way, please oh please submit it. Signed-off-by: Ed Santiago <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: edsantiago 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 |
...and this is what the failure looks like with a deliberate fault inserted: https://cirrus-ci.com/task/6541249260290048?logs=main#L335 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I still think most problems can be avoided if we use a markdown formatter in CI and enforce that files are formatted properly.
Lets merge this and then add the markdown validator in separate PR. |
/lgtm |
The new man-page table check (containers#19278) fails on RHEL8 because go-md2man is 2.00 and we require 2.02. After much deliberation.... just ignore the problem. Add a bold note to that part of the Makefile, and hope that when the test fails on the next RHEL branching someone will look at the Makefile, find the comment, and disable that test. Got any better ideas? Signed-off-by: Ed Santiago <[email protected]>
go-md2man is fragile, especially around tables (containers#18678, containers#19278). Podman man pages are finely tuned to look OK using v2.02, which is what we vendor in test/tools, so we should really use it instead of whatever is installed on the system. This fixes 'make docs' on RHEL8, broken as of containers#19278. Signed-off-by: Ed Santiago <[email protected]>
Every so often we hear reports of a corrupt man page table,
where columns are misaligned in nonsensical ways. The
traditional symptom looks like:
|----------------|--------------|
Cause: one of the tools in the man page generation chain,
maybe 'man' itself, has an undocumented length limit on
table cells, and an undocumented page width as well.
If you exceed these undocumented limits, you get corrupt
man pages. Silently.
This adds a horrible test for those. And I mean horrible:
I've tested by adding long '| sdf sdf | dsf |' rows to
a few man pages, and it triggers. That's the only good
thing I can say about it.
Other approaches I tried:
can detect something different about too-long cells
...and more that I've forgotten. This was the only way
that produced reliable errors. If you have a better way,
please oh please submit it.
Signed-off-by: Ed Santiago [email protected]