-
Notifications
You must be signed in to change notification settings - Fork 23
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
openqa-investigate: Fix dry-run depending on presence of comments #279
openqa-investigate: Fix dry-run depending on presence of comments #279
Conversation
This pull request is now in conflicts. Could you fix it? 🙏 |
This fixes the dry-run mode by returning from functions early or simulating the output of "openqa-clone-job" when we would call openqa-clone-job and parse its output. Before: ``` $ dry_run=1 ./openqa-investigate 3876947 jq (161 ./openqa-investigate): jq: parse error: Invalid numeric literal at line 1, column 11 (rc: 5 Input: >>>openqa-cli api --header User-Agent: openqa-investigate (https://github.com/os-autoinst/scripts) --host https://aquarius.suse.cz --retries=3 -X POST jobs/20047/comments text=Starting investigation for job 20047<<<) ``` After: ``` $ dry_run=1 ./openqa-investigate 3876947 openqa-cli api --header User-Agent: openqa-investigate (https://github.com/os-autoinst/scripts) --host https://openqa.opensuse.org -X PUT jobs/3876947/comments/ text=Automatic investigation jobs for job 3876947: openqa-clone-job --json-output --skip-chained-deps --max-depth 0 --parental-inheritance --within-instance https://openqa.opensuse.org/tests/3876947 TEST+=:investigate:retry _TRIGGER_JOB_DONE_HOOK=1 _GROUP_ID=0 BUILD= OPENQA_INVESTIGATE_ORIGIN=https://openqa.opensuse.org/t3876947 * **krypton-live:investigate:retry**: https://openqa.opensuse.org/tnull openqa-clone-job --json-output --skip-chained-deps --max-depth 0 --parental-inheritance --within-instance https://openqa.opensuse.org/tests/3876947 TEST+=:investigate:last_good_tests:b1712f3140cbe7ab8f30cf0647e54aa433e3c401 _TRIGGER_JOB_DONE_HOOK=1 _GROUP_ID=0 BUILD= CASEDIR=https://github.com/os-autoinst/os-autoinst-distri-opensuse.git#b1712f3140cbe7ab8f30cf0647e54aa433e3c401 OPENQA_INVESTIGATE_ORIGIN=https://openqa.opensuse.org/t3876947 * **krypton-live:investigate:last_good_tests:b1712f3140cbe7ab8f30cf0647e54aa433e3c401**: https://openqa.opensuse.org/tnull openqa-clone-job --json-output --skip-chained-deps --max-depth 0 --parental-inheritance --within-instance https://openqa.opensuse.org/tests/3836309 TEST+=:investigate:last_good_build:10.44 _TRIGGER_JOB_DONE_HOOK=1 _GROUP_ID=0 BUILD= OPENQA_INVESTIGATE_ORIGIN=https://openqa.opensuse.org/t3876947 * **krypton-live:investigate:last_good_build:10.44**: https://openqa.opensuse.org/tnull openqa-clone-job --json-output --skip-chained-deps --max-depth 0 --parental-inheritance --within-instance https://openqa.opensuse.org/tests/3836309 TEST+=:investigate:last_good_tests_and_build:b1712f3140cbe7ab8f30cf0647e54aa433e3c401+10.44 _TRIGGER_JOB_DONE_HOOK=1 _GROUP_ID=0 BUILD= CASEDIR=https://github.com/os-autoinst/os-autoinst-distri-opensuse.git#b1712f3140cbe7ab8f30cf0647e54aa433e3c401 OPENQA_INVESTIGATE_ORIGIN=https://openqa.opensuse.org/t3876947 * **krypton-live:investigate:last_good_tests_and_build:b1712f3140cbe7ab8f30cf0647e54aa433e3c401+10.44**: https://openqa.opensuse.org/tnull [*Detailed explanation of this comment*](https://github.com/os-autoinst/scripts#More-details-and-examples-about-openqa-investigate-comments) ``` Related progress issue: https://progress.opensuse.org/issues/153763
5021f80
to
ee4fbf2
Compare
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.
Can you provide example output?
Do you get any output in case of calling it on an investigate:retry job?
Yes, tried with https://openqa.opensuse.org/tests/3877133 . Then I am getting "Not found" which I consider acceptable as it does not show errors but that's just limitations. |
This fixes the dry-run mode by returning from functions early or
simulating the output of "openqa-clone-job" when we would call
openqa-clone-job and parse its output.
Before:
After:
Related progress issue: https://progress.opensuse.org/issues/153763