Actions
action #114529
openRabbitMQ: Wrong id type for restart events
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.
Actions