Improve error output when calling openqa-clone-custom-git-refspec with wrong args, not just exit code
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
- AC1: openqa-clone-custom-git-refspec has an option
--helpshowing help text
- AC2: openqa-clone-custom-git-refspec shows error messages telling the user what went wrong when wrong parameters have been used
#3 Updated by okurz over 1 year 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).
#8 Updated by okurz over 1 year 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.