Page MenuHomeSoftware Heritage

pattern: Make cgit/launchpad listers flush regularly origins to scheduler
AbandonedPublic

Authored by ardumont on Jan 29 2021, 4:44 PM.

Details

Reviewers
None
Group Reviewers
Reviewers
Summary

This reverts the pattern pushed in the main Lister class and defines it specifically in
the listers that were identified as needing it:

  • The launchpad lister has just one iterator of origins so this needs to be splitted to have incremental results flushed to the scheduler [1]
  • For cgit, it's mostly for instances which returns a high number of results per page (e.g git.eclipse.org, ...). [2]

[1] T2998#57546

[2] T2998#57500

[3] T376#57560

Diff Detail

Repository
rDLS Listers
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 18895
Build 29274: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 29273: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D4972 (id=17754)

Rebasing onto 2e22073558...

Current branch diff-target is up to date.
Changes applied before test
commit df54cb57048316854fad1e69fca1873a07b2b51c
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jan 29 16:33:05 2021 +0100

    pattern: Make cgit/launchpad listers flush regularly origins to scheduler
    
    This reverts the pattern pushed in the main Lister class and defines it specifically in
    the listers that were identified as needing it:
    
    - The launchpad lister has just one iterator of origins so this needs to be splitted to
      have incremental results flushed to the scheduler.
    
    - For cgit, it's mostly for instances which returns a high number of results per
      page (e.g git.eclispe.org).

See https://jenkins.softwareheritage.org/job/DLS/job/tests-on-diff/231/ for more details.

ardumont added inline comments.
swh/lister/cgit/lister.py
208

It may be worth pushing this in the swh.scheduler.pattern.StatelessLister class.
For now, settled on only cgit and launchpad as they were the most flagrant ones needing it.

swh/lister/cgit/lister.py
208

nvm that comment

(i meant stateless because i misremembered Debian, Launchpad, etc... as being ones but it's not the case.)

vlorentz added inline comments.
swh/lister/cgit/lister.py
205–206
swh/lister/launchpad/lister.py
123–137

isn't this exactly the same code?

swh/lister/launchpad/lister.py
123–137

yes, i did not put too much effort in this as i was not totally sold on it.
anyhow, this can be abandoned now

D4973 got accepted instead.