mirror of
https://github.com/odoo/runbot.git
synced 2025-03-17 00:15:47 +07:00
![]() When searching for new builds by parsing git refs, the new branches are created as well as the pending builds in the same _find_new_commits method. With this commit, this behavior is splitted into two methods, that way, it's now possible to create missing branches without creating new builds. The closest_branch detection is enhanced because all the new branches are created before the builds (separated loops). The find_new_commits method uses an optimized way to search for existsing builds. Before this commit, a build search was performed for each git reference, potentially a huge number. With this commit, a raw sql query is performed to create a set of tuples (branch_id, sha) which is enough to decide if a build already exists. A test was added to verify that new refs leads to pending builds. Also, a performance test was added but is skipped by default because it needs an existing repo with 20000 branches in the database so it will not work with an empty database. This test showed a gain of performance from 8sec to 2sec when creating builds from new commits. co-authored by @Xavier-Do |
||
---|---|---|
.. | ||
__init__.py | ||
branch.py | ||
build_dependency.py | ||
build.py | ||
event.py | ||
repo.py | ||
res_config_settings.py |