mozilla-services / mozilla-services/updatebot

Make irregexp more efficient

Open
#385 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement Medium
Dominant language
Python
Stars
9
Forks
8
PR merge metrics
No merged PRs in 30d

Description

SCMProvider.check_for_update will clone the entire v8 repo, despite the fact that we pre-cloned it, so we can run merge-base and related on it.

[task 2024-12-06T18:18:35.641Z] [Debug]  (SCMProvider irregexp job_id=661) ================================================
[task 2024-12-06T18:18:35.641Z] [Info]   (SCMProvider irregexp job_id=661) Beginning SCMProvider.check_for_update
[task 2024-12-06T18:18:35.641Z] [Debug]  (SCMProvider irregexp job_id=661)  Arguments: (<components.scmprovider.SCMProvider object at 0x7ff558951c50>, {{ irregexp  Core  JavaScript Engine  c3e48a7c58d9a88cb46848b59fb1f621c72a9606  https://chromium.googlesource.com/v8/v8.git  False  regular  iireland@mozilla.com  iain  sm-shell  None  None  js/src/irregexp/moz.yaml [{vendoring True None [] [] 1 week linux None None None }] }}, {vendoring True None [] [] 1 week linux None None None }, 'd9f0f66ecb8037e0ef9c38861fdbe4e95113e56a', <Job id: 654 library: irregexp>) {}
[task 2024-12-06T18:18:35.642Z] [Debug]  (CommandProvider irregexp job_id=661) ----------------------------------------------
[task 2024-12-06T18:18:35.642Z] [Info]   (CommandProvider irregexp job_id=661) Running ['git', 'clone', 'https://chromium.googlesource.com/v8/v8.git', '.']
[task 2024-12-06T18:20:00.847Z] [Info]   (CommandProvider irregexp job_id=661) Return: 0 Runtime (s): 85
[task 2024-12-06T18:20:00.847Z] [Debug]  (CommandProvider irregexp job_id=661) -------
[task 2024-12-06T18:20:00.847Z] [Debug]  (CommandProvider irregexp job_id=661) stdout:
[task 2024-12-06T18:20:00.847Z] [Debug]  (CommandProvider irregexp job_id=661) 
[task 2024-12-06T18:20:00.847Z] [Debug]  (CommandProvider irregexp job_id=661) -------
[task 2024-12-06T18:20:00.847Z] [Debug]  (CommandProvider irregexp job_id=661) stderr:
[task 2024-12-06T18:20:00.847Z] [Debug]  (CommandProvider irregexp job_id=661) Cloning into '.'...
[task 2024-12-06T18:20:00.847Z] Updating files:  88% (14993/16878)
[task 2024-12-06T18:20:00.847Z] Updating files:  89% (15022/16878)
[task 2024-12-06T18:20:00.847Z] Updating files:  90% (15191/16878)
[task 2024-12-06T18:20:00.847Z] Updating files:  91% (15359/16878)
[task 2024-12-06T18:20:00.847Z] Updating files:  92% (15528/16878)
[task 2024-12-06T18:20:00.847Z] Updating files:  93% (15697/16878)
[task 2024-12-06T18:20:00.847Z] Updating files:  94% (15866/16878)
[task 2024-12-06T18:20:00.847Z] Updating files:  95% (16035/16878)
[task 2024-12-06T18:20:00.847Z] Updating files:  96% (16203/16878)
[task 2024-12-06T18:20:00.847Z] Updating files:  97% (16372/16878)
[task 2024-12-06T18:20:00.847Z] Updating files:  98% (16541/16878)
[task 2024-12-06T18:20:00.847Z] Updating files:  99% (16710/16878)
[task 2024-12-06T18:20:00.847Z] Updating files: 100% (16878/16878)
[task 2024-12-06T18:20:00.847Z] Updating files: 100% (16878/16878), done.
[task 2024-12-06T18:20:00.847Z] 
[task 2024-12-06T18:20:00.847Z] [Debug]  (CommandProvider irregexp job_id=661) ----------------------------------------------
[task 2024-12-06T18:20:00.847Z] [Debug]  (CommandProvider irregexp job_id=661) ----------------------------------------------
[task 2024-12-06T18:20:00.847Z] [Info]   (CommandProvider irregexp job_id=661) Running ['git', 'merge-base', 'c3e48a7c58d9a88cb46848b59fb1f621c72a9606', 'd9f0f66ecb8037e0ef9c38861fdbe4e95113e56a']
[task 2024-12-06T18:20:00.851Z] [Info]   (CommandProvider irregexp job_id=661) Return: 0 Runtime (s): 0
[task 2024-12-06T18:20:00.851Z] [Debug]  (CommandProvider irregexp job_id=661) -------
[task 2024-12-06T18:20:00.851Z] [Debug]  (CommandProvider irregexp job_id=661) stdout:
[task 2024-12-06T18:20:00.851Z] [Debug]  (CommandProvider irregexp job_id=661) c3e48a7c58d9a88cb46848b59fb1f621c72a9606
[task 2024-12-06T18:20:00.851Z] 
[task 2024-12-06T18:20:00.851Z] [Debug]  (CommandProvider irregexp job_id=661) -------
[task 2024-12-06T18:20:00.851Z] [Debug]  (CommandProvider irregexp job_id=661) stderr:
[task 2024-12-06T18:20:00.851Z] [Debug]  (CommandProvider irregexp job_id=661) 
[task 2024-12-06T18:20:00.851Z] [Debug]  (CommandProvider irregexp job_id=661) ----------------------------------------------
[task 2024-12-06T18:20:00.851Z] [Debug]  (SCMProvider irregexp job_id=661) Our common ancestor is c3e48a7c58d9a88cb46848b59fb1f621c72a9606.
[task 2024-12-06T18:20:00.851Z] [Debug]  (CommandProvider irregexp job_id=661) ----------------------------------------------

We should do something where Updatebot gets told there is a pre-seeded checkout and uses that instead of doing a whole clone

Contributor guide

Open the contributing guide

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.

Research direction

Start at SCMProvider.check_for_update and trace how the pre-seeded checkout is passed to Updatebot and how the current git clone and merge-base commands are invoked. Confirm the existing checkout can replace the full clone, then verify that merge-base still runs against the intended revisions and that the clone is no longer performed.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, python
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.