action #62600
closedImprove error output when calling openqa-clone-custom-git-refspec with wrong args, not just exit code
0%
Description
Motivation¶
When options like --apikey
are passed as the first arguments, the script does not output anything and exits with 3:
% openqa-clone-custom-git-refspec --apikey aaaa --apisecret aaaa https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/9407 https://openqa.suse.de/tests/3817935
% echo $?
3
That's not very helpful.
openqa-clone-custom-git-refspec should have helpful messages on error and also --help
.
Acceptance criteria¶
- AC1: openqa-clone-custom-git-refspec has an option
--help
showing help text - AC2: openqa-clone-custom-git-refspec shows error messages telling the user what went wrong when wrong parameters have been used
Updated by okurz almost 5 years ago
- Category changed from Regressions/Crashes to Feature requests
that's not a regression though :) So we should regard as "Feature request".
Updated by okurz almost 5 years ago
- Subject changed from Calling openqa-clone-custom-git-refspec with wrong args leads to error and no output to Improve error output when calling openqa-clone-custom-git-refspec with wrong args, not just exit code
- Description updated (diff)
- Target version set to future
Hi tinita, I rewrote the ticket into a feature request according to https://progress.opensuse.org/projects/openqav3/wiki#Feature-requests . I hope I have preserved your initial intention. However I see the ticket of low prio as IMHO we should not invest reasonably more effort into a script which basically serves as a proof of concept for the time being and we plan to make openQA fully VCS aware in #58184 (first).
Updated by okurz almost 5 years ago
- Related to coordination #58184: [saga][epic][use case] full version control awareness within openQA added
Updated by okurz almost 5 years ago
- Status changed from New to Feedback
- Assignee set to okurz
good as a weekend time GNU getopt reminder refreshment task :)
Updated by ggardet_arm almost 5 years ago
- Status changed from Resolved to Workable
You should white list all the openqa-clone-job
args (--apikey
, --skip-download
, etc.) as it is just a wrapper.
Updated by okurz almost 5 years ago
- Status changed from Workable to Feedback
Actually the most common use case I found so far was for people manually supplying api key and secret in commands which I consider a bad practice. But anyway, https://github.com/os-autoinst/openQA/pull/2810 adds an argument which allows to pass additional arguments to the internal clone command. This I consider sufficient. I did not want to duplicate all potential parameters into the script for a "whitelist" and also I did not find a good way to simply pass all unknown parameters further so this is the approach I opted for.
Updated by okurz almost 5 years ago
- Status changed from Feedback to Resolved
merged and available in packages.