From 4bd21d42a37b1470cca5281e46a092066ecc9731 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 5 Dec 2014 18:00:50 -0500 Subject: [PATCH] Add support to the subunit workers to reuse zuul uuids The latest subunit2sql release, 0.2.1, added support for setting the id for a run. This commit adds support to the gearman workers for doing this using the zuul build_uuids. This way if an event has a build_uuid set in the metadata the id column for the row will match zuul's. This will be useful for when eventually want to correlate data between zuul and subunit2sql. Change-Id: Ic4aa13a6c92c3bc759e080fdc4c2e07ff8b881bd --- modules/subunit2sql/files/subunit-gearman-worker.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/subunit2sql/files/subunit-gearman-worker.py b/modules/subunit2sql/files/subunit-gearman-worker.py index dd1d125619..48638125da 100644 --- a/modules/subunit2sql/files/subunit-gearman-worker.py +++ b/modules/subunit2sql/files/subunit-gearman-worker.py @@ -181,6 +181,9 @@ class Subunit2SQLProcessor(object): if log_url: log_dir = os.path.dirname(os.path.dirname(log_url)) shell.CONF.set_override('artifacts', log_dir) + run_id = subunit.get('build_uuid', None) + if run_id: + shell.CONF.set_override('run_id', run_id) shell.CONF.set_override('run_meta', subunit) # Parse subunit stream and store in DB logging.debug('Converting Subunit V2 stream to SQL')