-
Notifications
You must be signed in to change notification settings - Fork 209
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
Allow scheduling and monitoring a product via openqa-cli
#5036
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5036 +/- ##
========================================
Coverage 98.23% 98.24%
========================================
Files 381 383 +2
Lines 35873 35974 +101
========================================
+ Hits 35241 35342 +101
Misses 632 632
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
This looks good!
@grisu48 as the author of openqa-mon, what do you think about this approach? Is it a good complementary solution, something completely different or duplicating behaviour?
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.
Pretty sure this breaks openqa-cli api
JSON output if the JSON contains unicode characters.
As mentioned in os-autoinst#5036 (review) this otherwise breaks outputting JSON.
When configuring exactly one retry, the loop currently does the following (assuming the request fails and should be retried): ``` 1. Request 2. Log "Request failed" and sleep for the configured retry delay ``` So no retry is done despite being logged and sleep being executed. This is identical to zero retries being configured except for 2. but should actually lead to two attempts in total. If more than one retry is configured the problem is the same of course. This change alters the behavior to be (and by the way needs two less lines of code): ``` 1. Request 2. Log "Request failed" and sleep for the configured retry delay 3. Do actually one more request ```
* As requested in the review * Related ticket: https://progress.opensuse.org/issues/125720
As mentioned in os-autoinst#5036 (review) this otherwise breaks outputting JSON.
No concerns by me. |
* Declare `$res` where is is actually used * Fix naming of command object
commit 529c547 Merge: 84fc5a7 2a8981b Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> AuthorDate: Mon Mar 20 18:52:16 2023 +0000 Commit: GitHub <noreply@github.com> CommitDate: Mon Mar 20 18:52:16 2023 +0000 Merge pull request os-autoinst#5036 from Martchus/schedule-iso Allow scheduling and monitoring a product via `openqa-cli`
Related ticket: https://progress.opensuse.org/issues/125720
Example invocation:
So one can use CLI-flags similar to
openqa-cli api
.Still a draft because unit tests are missing and the error handling needs to be improved (it should retry like
openqa-cli api
).