]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commit
teuthology/packaging.py: fix build_complete: search for requested arch 1693/head
authorDan Mick <dmick@redhat.com>
Tue, 9 Nov 2021 19:49:09 +0000 (11:49 -0800)
committerDan Mick <dmick@redhat.com>
Tue, 9 Nov 2021 20:04:25 +0000 (12:04 -0800)
commitc80939ff7d70afb9de746cd87e6833f0ce1e1b8f
treeea8989bf36bd2997228f4241ddc03bd98b6b3201
parent27954452159076fda5642b6c0eb0c4998b99d2e4
teuthology/packaging.py: fix build_complete: search for requested arch

The workaround from https://github.com/ceph/teuthology/pull/1649 was
necessary because my original algorithm was faulty: when searching
through all the builds for a ref/sha1, one must match the arch
requested by the call to build_complete (in the Builder object);
that arch's presence in the shaman api/search result is not enough
of a match, as it can contain multiple arches in multiple states
of build success.  Only a failure *on the requested arch* should be
considered a "requested build not complete".

(note: this will still currently fail a request for a build whose
repo is complete but container build failed, as "build complete"
currently conflates those two statuses.  Teuthology does not
contain the information whether a build is being requested for
packages, containers, or both.)

Also add testing for build_complete().

Fixes: https://tracker.ceph.com/issues/53205
Signed-off-by: Dan Mick <dmick@redhat.com>
teuthology/packaging.py
teuthology/test/test_packaging.py