zuul/tests
Tobias Henkel 4c972f00bd
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
2020-02-28 09:43:56 +01:00
..
fixtures Test canMerge also with checks api 2020-02-25 21:46:59 +01:00
nodepool Add caching of autohold requests 2019-09-16 10:46:36 -04:00
remote Remove support for ansible 2.5 2019-12-10 11:28:56 -05:00
unit Test canMerge also with checks api 2020-02-25 21:46:59 +01:00
__init__.py Add non-voting jobs. 2012-08-23 23:20:09 +00:00
base.py Make most test cases work on MacOS 2020-02-20 12:59:38 +01:00
encrypt_secret.py Make tests' encrypt_secret.py work with python3 2017-10-19 18:09:57 +00:00
fake_graphql.py Optimize canMerge using graphql 2020-02-28 09:43:56 +01:00
fakegithub.py Optimize canMerge using graphql 2020-02-28 09:43:56 +01:00
make_playbooks.py Use libyaml if possible 2017-04-04 11:49:05 -07:00
print_layout.py Do not add implied branch matchers in project-templates 2017-09-30 10:19:07 -07:00