-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add usage+help to all scripts #331
base: master
Are you sure you want to change the base?
Conversation
This pull request is now in conflicts. Could you fix it? 🙏 |
[[ $job_state = 'done' ]] && break | ||
usage() { | ||
cat << EOF | ||
Usage: $0 [OPTIONS] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add an example here on how to invoke this script (how to supply job id(s?)).
cat << EOF | ||
Usage: $0 [OPTIONS] | ||
|
||
Checks devel:openQA:Leap: OBS project dependencies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be a bit more descriptive here.
Even reading the source code I'm still not sure what exactly this script does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, me neither
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If nobody knows what this does, we might want to delete the script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the script is actively used within https://gitlab.suse.de/openqa/scripts-ci/
exit 99 | ||
usage() { | ||
cat << EOF | ||
Usage: $0 [OPTIONS] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include positional argument(s) in usage.
|
||
usage() { | ||
cat << EOF | ||
Usage: $0 [OPTIONS] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide an example call and/or a list of arguments (that are supplied via env in this case I guess)
|
||
usage() { | ||
cat << EOF | ||
Usage: $0 [OPTIONS] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide an example call and/or a list of arguments (that are supplied via env in this case I guess)
cat << EOF | ||
Usage: $0 [OPTIONS] | ||
|
||
Get statistics about recent incomplete openQA jobs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What kind of statistics? Does it simply print the sum of jobs that incompleted since $failed_since
?
@@ -388,4 +385,29 @@ main() { | |||
investigate "$@" | |||
} | |||
|
|||
usage() { | |||
cat << EOF | |||
Usage: echo jobnumber | $0 [OPTIONS] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some info on host_url, dry_run, verbose, prio_add, …
@@ -18,4 +28,16 @@ main() { | |||
exit $rc | |||
} | |||
|
|||
usage() { | |||
cat << EOF | |||
Usage: echo jobnumber | $0 [OPTIONS] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
|
||
Takes an openQA job URL, looks for matching "known issues", for example from | ||
progress.opensuse.org, labels the job and retriggers if specified in the issue | ||
(see the source code for details how to mark tickets). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some text on what a known issues is and how it is found in progress.
Also maybe add an example on these labels. I'm not even sure if this refers to labels on openQA jobs or on some magic strings in progress ticket subjects.
Looking at the source code I cannot answer this question - it would be more of a prerequisite to even understand the source.
@@ -46,4 +55,18 @@ hook() { | |||
fi | |||
} | |||
|
|||
usage() { | |||
cat << EOF | |||
Usage: $0 [OPTIONS] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the usage according to the description below
|
||
"hook script" intended to be called by openQA instances taking a job ID as | ||
parameter and forwarding a complete job URL to "openqa-label-known-issues" on | ||
stdin and all left unknowns to "openqa-investigate" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do 'left unknowns' refer to? Is this dependent on the output of openqa-label-known-issues that tells this script if a job is unknown (whatever that means)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didnt go through all the changes for now. But one thing, maybe a picky one, is to add an expected output.
Also some can be piped. if there are some common cases of those cases, it would be nice to documented somewhere.
|
||
usage() { | ||
cat << EOF | ||
Usage: $0 [OPTIONS] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the usage according to the description below.
Maybe add an example
cat << EOF | ||
Usage: $0 [OPTIONS] | ||
|
||
Checks the number of tickets in a redmine query against a "WIP-Limit". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document at least the most important env vars and what happens if check fails (exit code=1?)
cat << EOF | ||
Usage: $0 [OPTIONS] | ||
|
||
Triggers tests on an openQA instance testing openQA itself. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Triggers tests on an openQA instance testing openQA itself. | |
Schedules tests on an openQA instance testing openQA itself. | |
Using the openQA-in-openQA test distribution from: | |
https://raw.githubusercontent.com/os-autoinst/os-autoinst-distri-openQA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The application is called "trigger" so I would prefer to reuse that wording
reboot-stability-check
Outdated
cat << EOF | ||
Usage: $0 [OPTIONS] HOSTS... | ||
|
||
Conducts reboot stability checks against a space- separated list of hosts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Conducts reboot stability checks against a space- separated list of hosts. | |
Conducts reboot stability checks against a space- separated list of hosts. | |
Each host is pinged, checked for listening on port 22 and sshed to and rebooted several times. |
shift | ||
usage() { | ||
cat << EOF | ||
Usage: $0 path_to_testapi path_to_code_repository [path_to_another_repository] [...] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this script do and why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't know
I applied the suggested changes where possible. I will need to incorporate the other comments and rewrap where necessary. No need to review more in the current state. |
daf688b
to
acf742e
Compare
openqa-label-known-issues
Outdated
-h | --help) usage 0 ;; | ||
-H | --host) | ||
host=$2 | ||
shift |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shift | |
shift 2 |
This pull request is now in conflicts. Could you fix it? 🙏 |
…estability and extendability
…estability and extendability
…ity and extendability
acf742e
to
a3722ac
Compare
Related progress issue: https://progress.opensuse.org/issues/160889