Project

General

Profile

Actions

action #114529

open

RabbitMQ: Wrong id type for restart events

Added by ph03nix over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Regressions/Crashes
Target version:
QA (public, currently private due to #173521) - future
Start date:
2022-07-22
Due date:
% Done:

0%

Estimated time:
Tags:

Description

Observation

The id type for job restart events is of type string, whereas it should be of type int.

e.g.

# Correct form for job.done:   "id":10359

suse.openqa.job.done {"ARCH":"x86_64","BUILD":"0133","FLAVOR":"EC2-HPC-BYOS","HDD_1":"publiccloud_tools_0036.qcow2","MACHINE":"ec2_r4.8xlarge","TEST":"publiccloud_img_proof","bugref":null,"group_id":170,"id":10359,"newbuild":null,"reason":null,"remaining":0,"result":"user_cancelled"}

# Incrorrect form for job.restart: "id":"10359"
suse.openqa.job.restart {"ARCH":"x86_64","BUILD":"0133","FLAVOR":"EC2-HPC-BYOS","HDD_1":"publiccloud_tools_0036.qcow2","MACHINE":"ec2_r4.8xlarge","TEST":"publiccloud_img_proof","auto":0,"bugref":null,"group_id":170,"id":"10359","remaining":1,"result":{"10359":10360}}

Steps to reproduce

Observing the RabbitMQ stream and watching for job.restart events

Problem

This inconsistency causes problems when processing the json output with statically types programming languages like go:

rabbitmq recv error: json: cannot unmarshal string into Go struct field JobStatus.id of type int

Suggestion

Change the json type of the job ID for job.restart events from string to int

Workaround

None identified.


Related issues 1 (1 open0 closed)

Related to openQA Project (public) - action #165422: "which AMQP events does an instance publish?" size:MWorkable2024-08-17

Actions
Actions

Also available in: Atom PDF