]> git.apps.os.sepia.ceph.com Git - teuthology.git/commit
suite: Speed up 'newest' feature 1802/head
authorZack Cerza <zack@redhat.com>
Wed, 7 Dec 2022 18:55:14 +0000 (11:55 -0700)
committerZack Cerza <zack@redhat.com>
Thu, 8 Dec 2022 20:10:38 +0000 (13:10 -0700)
commitba4be811f37b8e10ee83298918840ee511b60610
tree3dffacdfb3899a1dae33a5ab04cb9f48ea21d2b0
parent9bec128dd601565e30176328eed57c0f37505420
suite: Speed up 'newest' feature

For a 'newest' value of N, we were calling find_git_parent N times.
find_git_parent was invoking githelper's 'refresh' endpoint each time,
which in my testing took 20-30 seconds. So, for a sha1 that needed 20
backtracks, I was seeing teuthology-suite take eight minutes to
complete. With this change, it took 30 seconds for the same
teuthology-suite invocation.

We were also not including the trailing slash on the 'refresh' endpoint,
resulting in a 308 redirect each time - doubling the request count.
That's fixed as well.

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/suite/run.py
teuthology/suite/test/test_run_.py
teuthology/suite/test/test_util.py
teuthology/suite/util.py