Project

General

Profile

Actions

action #122524

open

Request for job started RabbitMQ message

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

Status:
New
Priority:
Normal
Assignee:
-
Category:
Feature requests
Target version:
Start date:
2022-12-29
Due date:
% Done:

0%

Estimated time:

Description

User story

Currently there are RabbitMQ messages for:

  • When a job is created
  • When a job is completed
  • When a job is restarted

However there is no message for when a job is started. It would be great to have those messages as well. Those are needed e.g. for the upcoming RabbitMQ support in openqa-mon, which has otherwise to fall back to job pulling for determining when scheduled jobs are running.

Here is an example output of RabbitMQ when a new job is scheduled. We see the job.create message and a (much later) job.done message from a different job but no message, that the created job has been started (it has).

suse.openqa.job.create {"ARCH":"x86_64","ASSET_256":"openSUSE-Tumbleweed-NET-x86_64-Snapshot20221228-Media.iso.sha256","BACKEND":"qemu","BOOT_HDD_IMAGE":"1","BUILD":"20221228","CHECKSUM_ISO":"b8edd5e0bfd259d4f57606234509203d63c2dcb367ba1d3b966b518c79df1fd7","CLONED_FROM":"https:\/\/openqa.opensuse.org\/tests\/2991233","CONTAINERS_NO_SUSE_OS":"1","CONTAINERS_UNTESTED_IMAGES":"1","CONTAINER_IMAGE_TO_TEST":"registry.opensuse.org\/opensuse\/factory\/totest\/containers\/opensuse\/tumbleweed","CONTAINER_RUNTIME":"podman,docker","DESKTOP":"textmode","DISTRI":"opensuse","EXTRATEST":"cont","FLAVOR":"NET","FULLURL":"1","HDDSIZEGB":"20","HDD_1":"ubuntu-22.04-20221229.qcow2","ISO":"openSUSE-Tumbleweed-NET-x86_64-Snapshot20221228-Media.iso","ISO_MAXSIZE":"737280000","JOB_DESCRIPTION":"Runs image container test on Ubuntu using docker and podman","KEEP_GRUB_TIMEOUT":"1","MACHINE":"64bit","MIRROR_HTTP":"http:\/\/openqa.opensuse.org\/assets\/repo\/openSUSE-Tumbleweed-oss-i586-x86_64-Snapshot20221228","MIRROR_HTTPS":"https:\/\/openqa.opensuse.org\/assets\/repo\/openSUSE-Tumbleweed-oss-i586-x86_64-Snapshot20221228","MIRROR_PREFIX":"http:\/\/openqa.opensuse.org\/assets\/repo","NETBOOT":"1","QEMUCPU":"host","QEMURAM":"1536","REGISTRY":"3.71.98.16:5000","REPO_0":"openSUSE-Tumbleweed-oss-i586-x86_64-Snapshot20221228","REPO_1":"openSUSE-Tumbleweed-oss-i586-x86_64-Snapshot20221228","REPO_2":"openSUSE-Tumbleweed-oss-i586-x86_64-Snapshot20221228-debuginfo","REPO_3":"openSUSE-Tumbleweed-oss-i586-x86_64-Snapshot20221228-source","REPO_4":"openSUSE-Tumbleweed-non-oss-i586-x86_64-Snapshot20221228","REPO_NON_OSS":"openSUSE-Tumbleweed-non-oss-i586-x86_64-Snapshot20221228","REPO_OSS":"openSUSE-Tumbleweed-oss-i586-x86_64-Snapshot20221228","REPO_OSS_DEBUGINFO":"openSUSE-Tumbleweed-oss-i586-x86_64-Snapshot20221228-debuginfo","REPO_OSS_DEBUGINFO_PACKAGES":"java*,kernel-default-debug*,kernel-default-base-debug*,mraa-debug*,wicked-debug*","REPO_OSS_SOURCE":"openSUSE-Tumbleweed-oss-i586-x86_64-Snapshot20221228-source","REPO_OSS_SOURCE_PACKAGES":"coreutils*,yast2-network*,yast2-http-server*","SUSEMIRROR":"http:\/\/openqa.opensuse.org\/assets\/repo\/openSUSE-Tumbleweed-oss-i586-x86_64-Snapshot20221228","TEST":"containers_tw_image_on_ubuntu_host","TEST_SUITE_NAME":"-","VERSION":"Tumbleweed","VIDEOMODE":"text","VIRTIO_CONSOLE":"1","WORKER_CLASS":"qemu_x86_64","_GROUP_ID":"1","group_id":1,"id":11615,"remaining":1}

suse.openqa.job.done {"ARCH":"x86_64","BUILD":"20221228","FLAVOR":"NET","HDD_1":"ubuntu-22.04-20221229.qcow2","ISO":"openSUSE-Tumbleweed-NET-x86_64-Snapshot20221228-Media.iso","MACHINE":"64bit","TEST":"containers_tw_image_on_ubuntu_host","bugref":null,"group_id":1,"id":11615,"newbuild":null,"reason":null,"remaining":0,"result":"failed"}
suse.openqa.job.done {"ARCH":"x86_64","BUILD":":24847:shim","FLAVOR":"GCE-Incidents","HDD_1":"publiccloud_tools_0049.qcow2","MACHINE":"gce_n1_standard_2","TEST":"publiccloud_xfs_000-100","bugref":null,"group_id":null,"id":11614,"newbuild":null,"reason":null,"remaining":0,"result":"failed"}

Acceptance criteria

  • RabbitMQ message for when a job is started, e.g. in the suse.openqa.job.started topic.

Tasks

  • Implement a RabbitMQ message for when a job is started

Further details

None

Actions #1

Updated by okurz almost 2 years ago

  • Category set to Feature requests
  • Target version set to future

When talking about "job started" one can also think about additional use cases where other state changes are also interesting, e.g. switch from running to uploading, etc. So I am not sure if just the "started" will be enough. However, this should be a not so complicated change to bring in. ph03nix, I even think you should be able to bring in that feature yourself based on how the existing events are handled

Actions

Also available in: Atom PDF