-
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
Quadlet: ensure all keys are documented #21233
Quadlet: ensure all keys are documented #21233
Conversation
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.
Blocked pending resolution of many questions.
| RemapGid=FIXME | FIXME | | ||
| RemapUid=FIXME | FIXME | | ||
| RemapUidSize=FIXME | FIXME | | ||
| RemapUsers=FIXME | FIXME | |
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.
Someone please tell me how to fill these in, and if they're in the right unit section
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.
These keys were deprecated and therefore remove from the documentation. They are still supported in the code to maintain backward compatibility.
hack/xref-quadlet-docs
Outdated
my ($constname, $keystring) = ($1, $2); | ||
|
||
# const name *should* be the same as the string, except (sigh) | ||
# there's an inexplicable block of KeyNetworkFoo = "Foo". |
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.
"inexplicable" to me. If there's a great reason for it, please lmk so I can update the comment.
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.
When I added these keys the idea was to indicate that they relate the .network
files (and hence used in ConvertNetwork
). I don't see any harm in removing Network
if you want
hack/xref-quadlet-docs
Outdated
# There's also, sigh again, some preexisting mismatches | ||
unless ($constname =~ /Remap[GU]ID/) { |
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.
Barf. Since these are all undocumented, would it be possible to actually fix them?
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.
As I explained, these keys were deprected. I see that the code looks for deprecated
. So, I guess the solution is to add this comment to these lines
hack/xref-quadlet-docs
Outdated
# sigh: "Driver" and "Options" also exist in KeyNetworkFoo space | ||
warn "$ME: $path:$.: duplicate key string \"$keystring\"\n" | ||
unless $keystring =~ /^(Driver|Options)$/; |
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.
Barf again. Just checking: is it intentional to have multiple Driver
and Options
definitions?
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.
I think that is something that should be fixed in the code.
I guess this is due the fact that we have Driver/Options for Volume and Network units for example. So it would need to be documented for each unit type. But yeah there is really no reason to define the same string const twice in the code unless we like to bloat the binary size by some bytes.
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.
As I wrote, the Network
part can be removed (and then also remove the duplications)
### `VolatileTmp=` | ||
|
||
FIXME |
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.
I would need to look through the git log but if I remember correctly this key is deprecated and thus not documented.
I like the idea of this but I think we need to have a way to ignore some keys. Maybe we could add // deprecated
as comment in the code behind the key name and you script could see it and not force the docs or something like this.
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.
Thank you! #20479. I had missed that. And I like the idea of // deprecated
.
9a43ec7
to
11cde41
Compare
Thank you @ygalblum. I've removed the |
11cde41
to
2db11fa
Compare
@@ -835,6 +836,7 @@ Valid options for `[Kube]` are listed below: | |||
| AutoUpdate=registry | --annotation "io.containers.autoupdate=registry" | | |||
| ConfigMap=/tmp/config.map | --config-map /tmp/config.map | | |||
| ContainersConfModule=/etc/nvd\.conf | --module=/etc/nvd\.conf | | |||
| ExitCodePropagation=how | How to propagate container error status | |
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.
Please align |
to the end of the table
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.
ARGH! Thank you for catching that. Fixed, but I will not push until I see how CI does.
2db11fa
to
571bded
Compare
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: edsantiago, ygalblum 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 |
- A number of keys had a "Network" prefix, for historical reasons that never panned out ("KeyNetworkGateway"). Remove that prefix and remove the two duplicates. - Three RemapXXX keys were mismatched in case ("UID" vs "Uid"). Make those consistent. Signed-off-by: Ed Santiago <[email protected]>
New CI validation check: all keys in quadlet.go must be documented at least once in podman-systemd.unit.5.md. Adding '// deprecated' next to an enum definition will exclude said key from the documentation cross-checks. And, because the md file lists keys in both table and block form, make sure those all match. And make sure everything is sorted in lexical order, in both .go source and in man page. And add a validation check to make sure it stays that way. Signed-off-by: Ed Santiago <[email protected]>
571bded
to
a5612bc
Compare
rebased out of paranoia. This is ready to go. |
/lgtm |
ce42c9f
into
containers:main
New CI validation check: all keys in quadlet.go must be
documented at least once in podman-systemd.unit.5.md.
And, because the md file lists keys in both table and block
form, make sure those all match.
And make sure everything is sorted in lexical order.
You'd think that by now I would know enough to add
[NO NEW TESTS NEEDED]
Signed-off-by: Ed Santiago [email protected]