action #153763
closed[regression] Fix dry-run of openqa-investigate size:S
0%
Description
Motivation¶
(Oliver Kurz) maybe changes have broken the dry run
(Tina Müller) yeah, line 161 is doing a openqa-cli POST request and expecting a JSON response. that won't work if it's replaced with an echo
Command-line used:
host=aquarius.suse.cz dry_run=1 exclude_no_group=false ./openqa-investigate 20047
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<<<)
Acceptance Criteria¶
- AC1: Dry run does not fail
Suggestions¶
- The code is POSTing a comment and then GETting it back, so we need to mock the response(s)
- Alternatively to mocking, add some input validation to the code block in question and make it do nothing
- e.g. add an early return in
sync_via_investigation_comment()
echoing a made-up comment id
- e.g. add an early return in
- Add a unit test for it (Test-Driven Development)
- "dry run" should be understood to potentially read data from external services, but never modify anything or write changes back -> Don't leave behind any traces
- Consider documenting this somewhere
Updated by okurz about 1 year ago
- Category changed from Feature requests to Regressions/Crashes
Updated by livdywan about 1 year ago
- Status changed from Workable to New
I don't think this was estimated
Updated by livdywan about 1 year ago
- Subject changed from Fix dry-run of openqa-investigate to [regression] Fix dry-run of openqa-investigate size:S
- Description updated (diff)
- Status changed from New to Workable
Updated by okurz about 1 year ago
I have an idea about fixing that. Unless you already did some code changes you can wait and I can prepare a PR. Whatever you prefer.
Updated by okurz about 1 year ago
- Status changed from Workable to In Progress
Updated by tinita about 1 year ago
- Copied to action #153874: [regression] openqa-investigate post investigate feature is broken added
Updated by jbaier_cz about 1 year ago
- Status changed from In Progress to Feedback
- Assignee changed from jbaier_cz to okurz
Is anything else needed here? Looks like we are done here.