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

Quadlet -dryrun arg #16926

Merged
merged 1 commit into from
Jan 3, 2023
Merged

Conversation

odra
Copy link
Contributor

@odra odra commented Dec 22, 2022

Signed-off-by: Leonardo Rossetti lrossett@redhat.com

I've added a -dyrun argument to the Quadlet CLI so generated unit files are printed to stdout instead of creating a file - I found this useful when I needed to check how the end result of the generated unit file.

Does this PR introduce a user-facing change?

Added a -dryrun cli argument to quadlet, making parsed unit files to be printed out to stdout instead of creating files.

if err != nil {
Logf("Can't create dir %s: %s", outputPath, err)
if len(units) == 0 {
Debugf("Not files to parse from %s", sourcePaths)
Copy link
Member

Choose a reason for hiding this comment

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

Should this be No files to parse ...

@rhatdan
Copy link
Member

rhatdan commented Dec 22, 2022

Any chance you can add a test?

Otherwise add [NO NEW TESTS NEEDED] to the commit message above.

@rhatdan
Copy link
Member

rhatdan commented Dec 26, 2022

Your new test is failing.

@odra
Copy link
Contributor Author

odra commented Dec 26, 2022

Is this a CI issue? The following test also failed: test/e2e/volume_plugin_test.go

@rhatdan
Copy link
Member

rhatdan commented Dec 29, 2022

Yes just concentrate on fixing your tests. the other failures are almost guaranteed to be flakes.

@TomSweeneyRedHat
Copy link
Member

LGTM once the tests are all hip.

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

Changes LGTM

Please squash the commits into one before merging.

Signed-off-by: Leonardo Rossetti <lrossett@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Jan 3, 2023

/approve
/lgtm
/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 3, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 3, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 3, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: odra, rhatdan

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 3, 2023
@rhatdan
Copy link
Member

rhatdan commented Jan 3, 2023

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 3, 2023
@openshift-merge-robot openshift-merge-robot merged commit f2881af into containers:main Jan 3, 2023
@riyad
Copy link
Contributor

riyad commented Jan 15, 2023

This seems to be a very odd choice ... isn't this option normally written --dry-run (i.e. with 3 dashes) ? 🤨

@vrothberg
Copy link
Member

This seems to be a very odd choice ... isn't this option normally written --dry-run (i.e. with 3 dashes) ? raised_eyebrow

Not in the world of Go. The entire Go toolchain uses only one dash for CLI options. Using two would imply using a different CLI parses and in turn binary bloat.

@riyad
Copy link
Contributor

riyad commented Jan 18, 2023

Exactly my argument ... Podman/Quadlet is not a piece of the Go toolchain and has a large body of already implemented CLI options that follow a different naming scheme ... hence this choice is inconsistent in the context of Podman /Quadlet.

Ironically even the author of #15903 assumed this option should/would be written --dry-run 😉

I didn't want to drag this out, I just wanted to point out this inconsistency before it gets "set in stone" by the upcoming 4.4 release and trips up users, maintainers and documentation writers down the line. 😓

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants