Actions
action #104836
closed[easy] perl warning about uninitialized value in pattern match when localhost not reachable size:S
Description
Observation¶
On a machine with no running openQA server
dc196a2b0353:/ # openqa-cli api jobs
Use of uninitialized value $res_code in pattern match (m//) at /usr/share/openqa/script/../lib/OpenQA/CLI/api.pm line 57.
Connection refused
Steps to reproduce¶
podman run --pull=always --rm -it registry.opensuse.org/opensuse/tumbleweed /bin/sh -c 'zypper -n in openQA-client && openqa-cli api jobs'
Acceptance criteria¶
- AC1: No perl warning when called again localhost when no openQA server is running
Suggestions¶
- Take a look into lib/OpenQA/CLI/api.pm line 57 and prevent the use of uninitialized
$res_code
Updated by livdywan almost 3 years ago
- Subject changed from [easy] perl warning about uninitialized value in pattern match when localhost not reachable to [easy] perl warning about uninitialized value in pattern match when localhost not reachable size:M
- Status changed from New to Workable
Updated by livdywan almost 3 years ago
- Subject changed from [easy] perl warning about uninitialized value in pattern match when localhost not reachable size:M to [easy] perl warning about uninitialized value in pattern match when localhost not reachable size:S
Updated by kodymo almost 3 years ago
PR: https://github.com/os-autoinst/openQA/pull/4452
res_code gets the value 0 if it's uninitialized.
Updated by kodymo almost 3 years ago
- Status changed from Feedback to Resolved
Set the ticket to resolved as there were no complaints.
I also verified that it works in production
Actions