Project

General

Profile

Actions

action #104836

closed

[easy] perl warning about uninitialized value in pattern match when localhost not reachable size:S

Added by okurz over 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Regressions/Crashes
Target version:
Start date:
2022-01-12
Due date:
% Done:

0%

Estimated time:

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
Actions #1

Updated by livdywan over 2 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
Actions #2

Updated by livdywan over 2 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
Actions #3

Updated by kodymo over 2 years ago

  • Assignee set to kodymo
Actions #4

Updated by kodymo over 2 years ago

PR: https://github.com/os-autoinst/openQA/pull/4452

res_code gets the value 0 if it's uninitialized.

Actions #5

Updated by tinita over 2 years ago

  • Status changed from Workable to Feedback
Actions #6

Updated by kodymo about 2 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

Also available in: Atom PDF