diff options
author | Tobias Henkel <tobias.henkel@bmw.de> | 2020-02-25 21:19:54 +0100 |
---|---|---|
committer | Tobias Henkel <tobias.henkel@bmw.de> | 2020-02-28 09:43:56 +0100 |
commit | 4c972f00bdca8526fc2c21a68022a17e6cbdbfac (patch) | |
tree | 5e2b1ae026d0d8a6632a03a14ead7c782eb1b0ad /test-requirements.txt | |
parent | 1ed1c7f53d829246a85aa65dea2887bfb61be588 (diff) | |
download | zuul-4c972f00bdca8526fc2c21a68022a17e6cbdbfac.tar.gz |
Optimize canMerge using graphql
The canMerge check is executed whenever zuul tests if a change can
enter a gate pipeline. This is part of the critical path in the event
handling of the scheduler and therefore must be as fast as
possible. Currently this takes five requests for doing its work and
also transfers large amounts of data that is unneeded:
* get pull request
* get branch protection settings
* get commits
* get status of latest commit
* get check runs of latest commit
Especially when Github is busy this can slow down zuul's event
processing considerably. This can be optimized using graphql to only
query the data we need with a single request. This reduces requests
and load on Github and speeds up event processing in the scheduler.
Since this is the first usage of graphql this also sets up needed
testing infrastructure using graphene to mock the github api with real
test data.
Change-Id: I77be4f16cf7eb5c8035ce0312f792f4e8d4c3e10
Diffstat (limited to 'test-requirements.txt')
-rw-r--r-- | test-requirements.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test-requirements.txt b/test-requirements.txt index f2ff59c4c..f7ee86ed4 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,3 +5,4 @@ testtools>=0.9.32 PyMySQL psycopg2-binary beautifulsoup4 +graphene |