docs: add design for quadlet verify #29815
I think it should print only errors and align with https://www.linfo.org/rule_of_silence.html
What about also printing a warning (e.g., deprecated keys)?
I like the idea of not duplicating work; I would recommend extracting the generator process() loop into shared code in pkg/systemd/quadlet (or similar).
Will that have an arg that is the file/dir path or how to get input in that command? What about templates?
In addition to this, I would add an optional --strict flag to treat warnings as failures.
Also, I would clarify the limits of verify explain conversion failures, not every cause of Not loaded in list.
PTAL @simonbrauner @podman-container-tools/podman-maintainers @podman-container-tools/podman-reviewers
I'm thinking that there could be different non-zero statuses to distinguish between "some of the quadlets are invalid" and "the command itself was unsuccessful". For scripting.
Or alternatively, there could be --filter like in list.
I'm also in favor of refactoring rather than running the generator binary and parsing its output.
And just a minor point: the quadlet binary is relatively small, so I think it would be best to make sure the refactor doesn't add unnecessary dependencies to it.
It might be safer not to do this, to guarantee the code is running exactly as systemd would run it.
@ygalblum PTAL
@mheon thanks for tagging me. Nothing to add on top of the existing comments
It might also be a good idea to have a --format flag since this command would be a good addition for scripting and CI. But that's not necessarily an immediate requirement.
If we are able to properly abstract out the critical pieces, is that still a problem given we build both the binaries from the same source and (presumably) at the same time?
That's fair. I won't block on this if we want to re-use the code instead of calling the verifier binary.
LGTM
@Ramya0405 Any updates on this?
A friendly reminder that this PR had no activity for 30 days.
mheon
Ramya0405
Ref: #29804
<!-- Thanks for sending a pull request! -->
Checklist
Ensure you have completed the following checklist for your pull request to be reviewed:
<!-- Use [x] to mark as done, or click the checkbox after opening PR -->
commits. (
git commit -s). (If needed, usegit commit -s --amend). The author email must matchthe sign-off email address. See CONTRIBUTING.md
for more information.
Fixes: #00000in commit message (if applicable)make validatepr(format/lint checks)Noneif no user-facing changes)Does this PR introduce a user-facing change?
<!--
Write
Noneif there are no user-facing changes, otherwise enter your release note below.Include "action required" if users need to take action when upgrading.
-->
``
release-note``