Project

General

Profile

Actions

action #62600

closed

Improve error output when calling openqa-clone-custom-git-refspec with wrong args, not just exit code

Added by tinita almost 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
Feature requests
Target version:
QA (public, currently private due to #173521) - future
Start date:
2020-01-23
Due date:
% Done:

0%

Estimated time:

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

Related issues 1 (1 open0 closed)

Related to openQA Project (public) - coordination #58184: [saga][epic][use case] full version control awareness within openQABlockedokurz2019-08-01

Actions
Actions #1

Updated by tinita almost 5 years ago

  • Description updated (diff)
Actions #2

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".

Actions #3

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).

Actions #4

Updated by okurz almost 5 years ago

  • Related to coordination #58184: [saga][epic][use case] full version control awareness within openQA added
Actions #5

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 :)

https://github.com/os-autoinst/openQA/pull/2702

Actions #6

Updated by okurz almost 5 years ago

  • Status changed from Feedback to Resolved

merged.

Actions #7

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.

Actions #8

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.

Actions #9

Updated by okurz almost 5 years ago

  • Status changed from Feedback to Resolved

merged and available in packages.

Actions

Also available in: Atom PDF