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 repeat parameter to clone a job multiple times #5331
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
ae93e46
to
25b4390
Compare
I suppose this feature deserves a unit test. |
By the way, what prevents you from doing simply |
No one prevents you, I guess it's just a matter of 'user experience', as discussed in the ticket. You can always wrap the clone-job inside a for loop, but if you feel lazy just use the |
25b4390
to
d8f74b2
Compare
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5331 +/- ##
=======================================
Coverage 98.32% 98.32%
=======================================
Files 389 389
Lines 37286 37317 +31
=======================================
+ Hits 36660 36691 +31
Misses 626 626
☔ View full report in Codecov by Sentry. |
Looks pretty good |
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.
Sounds like a nice idea but please provide much more detail into your git commit message to be able to follow your motivation and design choices
d8f74b2
to
d4fddec
Compare
d4fddec
to
27c9358
Compare
I saw that you updated your PR but the suggestions from comments haven't been implemented yet. Can you implement those or comment on which different path you want to take? |
Agree; added a new unit test |
27c9358
to
86a2fee
Compare
86a2fee
to
13bfa84
Compare
13bfa84
to
23cdd62
Compare
23cdd62
to
46a8d5d
Compare
From https://app.circleci.com/pipelines/github/os-autoinst/openQA/12328/workflows/dec7ae53-201a-46cc-9558-0a06c041ce8a/jobs/115056 it says "Cloning children of myjob". Please make sure that all output is caught by Test::Output functions or other means. Possibly this test or others already provide good examples. |
to better support statistical investigation, we want to provide an immediate way to clone a job multiple times. Till now it has been done with a for loop similar to for i in {01..50}; do openqa-clone-job … TEST+=-$i; done But we can avoid the API overhead of copying the same parameters and assets again and again from the original job, simply by cloning it once and posting the new job(s) N times. TEST name is automatically numbered, so the user is not forced to remember any shell syntax. As the default is --repeat=1, the API remains compatible with any shell script using the openqa-clone-job program.
46a8d5d
to
5667ab6
Compare
good point, fixed with latest commit-push |
@Mergifyio rebase |
✅ Nothing to do for rebase action |
I guess that's unrelated. I will retrigger the test. |
thank you. With the rebase request my intent was the sam but there was nothing to rebase so that did not retrigger anything |
commit c5419ae Merge: f721830 5667ab6 Author: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> AuthorDate: Thu Oct 19 15:47:00 2023 +0000 Commit: GitHub <noreply@github.com> CommitDate: Thu Oct 19 15:47:00 2023 +0000 Merge pull request os-autoinst#5331 from ilmanzo/poo122953_multiple_jobs Add repeat parameter to clone a job multiple times
I've just used this parameter to create https://openqa.suse.de/tests/overview?version=5.5&build=Martchus%2Fos-autoinst-distri-opensuse%2318034-m2048&distri=sle-micro and admittedly, it is more convenient than the for loop :-) |
Reference ticket: https://progress.opensuse.org/issues/122953
to better support statistical investigation, we want to provide an
immediate way to clone a job multiple times. Till now it has been done
with a for loop similar to
But we can avoid the API overhead of copying the same parameters and
assets again and again from the original job, simply by cloning it once and
posting the new job(s) N times. The TEST name is automatically numbered, so the
user is not forced to remember any shell syntax.
As the default is
--repeat=1
, the API remains compatible with any shellscript using the
openqa-clone-job
program.