Asynchronify `_schedule_fp_followup`

Open
#1,580 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start by locating _schedule_fp_followup and the batch recomputation path that calls it. The issue reports that this call takes 3–4 seconds and logs heavily during simultaneous PR status changes, and suggests moving it to a cron. Determine how that work is scheduled and how to verify the same follow-up still runs after the change.

Written by the indexing model from the issue text.

Description

mergebot

If a lot of PR statuses get modified at the same time (e.g. by updating the required statuses on a repo), this triggers a lot of batch recomputation, which isn't a massive issue until... the call to _schedule_fp_followup which does take some time and logs quite a lot.

It's probably not the entire thing, but locally it accounts for a good 3~4 seconds of 10-ish and a significant amount of logging, so would probably make sense to move it to a cron...

Dominant language
Python
Stars
166
Forks
160
Avg merge
2d 14h
Merged PRs (30d)
32

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from odoo/runbot

All issues in odoo/runbot

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.