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

docs: regenerate markdown #4884

Merged
merged 1 commit into from
Feb 21, 2024
Merged

Conversation

thaJeztah
Copy link
Member

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@thaJeztah
Copy link
Member Author

I think something is broken .. somewhere. Trying to re-generate docs from the master branch (make -f docker.Makefile mdddocs) didn't show me a diff, but I noticed I did get updates when rebasing #4228

@@ -13,7 +13,7 @@ Attach local standard input, output, and error streams to a running container
|:----------------|:---------|:--------|:----------------------------------------------------|
| `--detach-keys` | `string` | | Override the key sequence for detaching a container |
| `--no-stdin` | | | Do not attach STDIN |
Copy link
Member

Choose a reason for hiding this comment

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

Wonder if we should always display bool type even if it defaults to false? Would need changes in cli-docs-tool

Copy link
Member Author

Choose a reason for hiding this comment

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

good one, yes. Looking at the string above, effectively that's the same;

  • always show type
  • but don't show default if there's no default (or if default == type's empty value??)

(last part doesn't look consistent there though, because --cpu-shares shows 0 as default, which is also the default for an int64 - wondering why that is 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

we purposefully hide zero values when rendering the pages on docs.docker.com atm
https://github.com/docker/docs/blob/main/layouts/_default/cli.html#L118

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, so funny thing is that there's some "special code" for membytes, which describes we did so for Cobra to hide it 🤔

cli/opts/opts.go

Lines 446 to 450 in f6b7a11

func (m *MemBytes) String() string {
// NOTE: In spf13/pflag/flag.go, "0" is considered as "zero value" while "0 B" is not.
// We return "0" in case value is 0 here so that the default value is hidden.
// (Sometimes "default 0 B" is actually misleading)
if m.Value() != 0 {

Copy link
Member

Choose a reason for hiding this comment

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

Opened docker/cli-docs-tool#50 to display bool type

@thaJeztah
Copy link
Member Author

oh fun! so it does re-generate on master as well, but ... with the old version? Did we forget to update some version somewhere? 🤔

@thaJeztah
Copy link
Member Author

Ah! We did! There's two separate CLI_DOCS_TOOL_VERSION vars, and we only updated one 🤦

: "${CLI_DOCS_TOOL_VERSION=v0.6.0}"

: "${CLI_DOCS_TOOL_VERSION=v0.7.0}"

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Merging #4884 (696500e) into master (caf7265) will not change coverage.
Report is 1 commits behind head on master.
The diff coverage is n/a.

❗ Current head 696500e differs from pull request most recent head f2e98f9. Consider uploading reports for the commit f2e98f9 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4884   +/-   ##
=======================================
  Coverage   61.32%   61.32%           
=======================================
  Files         287      287           
  Lines       20063    20063           
=======================================
  Hits        12303    12303           
  Misses       6867     6867           
  Partials      893      893           

Copy link
Contributor

@dvdksn dvdksn left a comment

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit 1443014 into docker:master Feb 21, 2024
88 checks passed
@thaJeztah thaJeztah deleted the regenerate_mdddocs branch February 21, 2024 10:33
asirago pushed a commit to Lussebullen/cli that referenced this pull request Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants