Skip to content

Add openqa-config script for showing/changing config values #6591

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

perlpunk
Copy link
Contributor

Related issue: https://progress.opensuse.org/issues/184459

I was tired of either having to add instructions to manually edit config files, or to have to use some sed statement to manipulate a config file.

I think there can be made some improvements regarding the output.
Right now it outputs human readable YAML, but I think it could also output JSON when requested, so you could process a section or the whole config file with jq for example.

@perlpunk
Copy link
Contributor Author

Note that there are some general ini manipulation scripts out there. I haven't tried them out yet.
The advantage here could be that we could also show default values from OpenQA::Setup on request.

Related issue: https://progress.opensuse.org/issues/184459

I was tired of either having to add instructions to manually edit
config files, or to have to use some `sed` statement to manipulate
a config file.
@perlpunk
Copy link
Contributor Author

perlpunk commented Jul 16, 2025

There is https://github.com/pixelb/crudini which is in Leap 15.6.
It doesn't have an option for JSON output unfortunately. But maybe they accept pull requests...

We would need to check if it is compatible with Config::IniFiles though

@perlpunk
Copy link
Contributor Author

I think for https://progress.opensuse.org/issues/184459 I will use crudini, it seems to work fine

Copy link
Contributor

@b10n1k b10n1k left a comment

Choose a reason for hiding this comment

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

what it would be nice is to have a config subcommand in openqa-cli. something like openqa-cli config show as other tools do like git.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants