Page MenuHomeSoftware Heritage

opam: Make the instance optional and derived from the url
ClosedPublic

Authored by ardumont on Sep 20 2021, 5:48 PM.

Details

Summary

This matches how it's done for all other multi instances lister.

Related to T3590
Depends on D6310

Test Plan

tox

Diff Detail

Repository
rDLS Listers
Branch
opam-root-init
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 23852
Build 37198: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 37197: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D6312 (id=22904)

Could not rebase; Attempt merge onto c803fc2b59...

Updating c803fc2..b1a6f8f
Fast-forward
 swh/lister/opam/lister.py            | 14 +++++++++----
 swh/lister/opam/tests/test_lister.py | 39 +++++++++++++++++++++++++++++-------
 swh/lister/pattern.py                | 13 ++++++++++++
 3 files changed, 55 insertions(+), 11 deletions(-)
Changes applied before test
commit b1a6f8f3632d95085333b420e3e9fb2f0974d6ae
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Sep 20 17:47:29 2021 +0200

    opam: Make the instance optional and derived from the url
    
    This matches how it's done for all other multi instances listers.

commit 05ad61681276c69a63b871e977059871f705a9a7
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Sep 20 17:41:19 2021 +0200

    opam: Separate side-effects call from the constructor
    
    We should avoid side-effects in the constructor as much as possible. That avoids
    surprising behavior at object instantiation time. The state if needed should be now
    built within the `swh.lister.patter.Lister.prepare` method.
    
    This also fixes the current test that actually bootstrap a real opam local "clone".

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

Build is green

Patch application report for D6312 (id=22907)

Could not rebase; Attempt merge onto c803fc2b59...

Updating c803fc2..0feddfa
Fast-forward
 swh/lister/opam/lister.py            | 14 +++++++++----
 swh/lister/opam/tests/test_lister.py | 39 +++++++++++++++++++++++++++++-------
 swh/lister/pattern.py                | 13 ++++++++++++
 3 files changed, 55 insertions(+), 11 deletions(-)
Changes applied before test
commit 0feddfaced6df52b06a145c1e9c905becf61b4d3
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Sep 20 17:47:29 2021 +0200

    opam: Make the instance optional and derived from the url
    
    This matches how it's done for all other multi instances listers.
    
    Related to T3590

commit 2d0099bf7206347298e38603130445e79a9bf1dd
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Sep 20 17:41:19 2021 +0200

    opam: Separate side-effects call from the constructor
    
    We should avoid side-effects in the constructor as much as possible. That avoids
    surprising behavior at object instantiation time. The state if needed should be now
    built within the `swh.lister.patter.Lister.prepare` method.
    
    This also fixes the current test that actually bootstrap a real opam local "clone".
    
    Related to T3590

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

Build is green

Patch application report for D6312 (id=22913)

Could not rebase; Attempt merge onto c803fc2b59...

Updating c803fc2..34880c7
Fast-forward
 swh/lister/opam/lister.py            | 16 +++++++++------
 swh/lister/opam/tests/test_lister.py | 39 +++++++++++++++++++++++++++++-------
 swh/lister/pattern.py                | 13 ++++++++++++
 3 files changed, 55 insertions(+), 13 deletions(-)
Changes applied before test
commit 34880c73a2154a24a6fd3e0f8b707b951f810ec8
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Sep 20 17:47:29 2021 +0200

    opam: Make the instance optional and derived from the url
    
    This matches how it's done for all other multi instances listers.
    
    Related to T3590

commit 0af407999ab4932e4dccf51897e0402d748a3f03
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Sep 20 17:41:19 2021 +0200

    opam: Move the state initialization into the get_pages method
    
    We should avoid side-effects in the constructor as much as possible. That avoids
    surprising behavior at object instantiation time. The state if needed must be
    initialized into the `swh.lister.pattern.Lister.get_pages` method, as preconized in the
    class docstring.
    
    This also fixes the current test that actually bootstrap a real opam local "clone" in
    /tmp.
    
    Related to T3590

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

Build is green

Patch application report for D6312 (id=22917)

Could not rebase; Attempt merge onto c803fc2b59...

Updating c803fc2..2398ca8
Fast-forward
 swh/lister/opam/lister.py            | 16 +++++++++------
 swh/lister/opam/tests/test_lister.py | 40 +++++++++++++++++++++++++++++-------
 2 files changed, 43 insertions(+), 13 deletions(-)
Changes applied before test
commit 2398ca85c8c4685465945c305a67279a67f7ba55
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Sep 20 17:47:29 2021 +0200

    opam: Make the instance optional and derived from the url
    
    This matches how it's done for all other multi instances listers.
    
    Related to T3590

commit c160376b17175bd8fa73adddf2e14b8dcfad947b
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Sep 20 17:41:19 2021 +0200

    opam: Move the state initialization into the get_pages method
    
    We should avoid side-effects in the constructor as much as possible. That avoids
    surprising behavior at object instantiation time. The state if needed must be
    initialized into the `swh.lister.pattern.Lister.get_pages` method, as preconized in the
    class docstring.
    
    This also fixes the current test that actually bootstrap a real opam local "clone" in
    /tmp.
    
    Related to T3590

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

olasd added a subscriber: olasd.

Cool, thanks.

This revision is now accepted and ready to land.Sep 21 2021, 11:07 AM

Build is green

Patch application report for D6312 (id=22923)

Could not rebase; Attempt merge onto c803fc2b59...

Updating c803fc2..ff5e86f
Fast-forward
 swh/lister/opam/lister.py            | 16 +++++++++------
 swh/lister/opam/tests/test_lister.py | 40 +++++++++++++++++++++++++++++-------
 2 files changed, 43 insertions(+), 13 deletions(-)
Changes applied before test
commit ff5e86ff489eb1d3c504fe6f0a3392db4d8b6c19
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Sep 20 17:47:29 2021 +0200

    opam: Make the instance optional and derived from the url
    
    This matches how it's done for all other multi instances listers.
    
    Related to T3590

commit b69b0b7fd6745cd579acf2e5544c3810217bb542
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Sep 20 17:41:19 2021 +0200

    opam: Move the state initialization into the get_pages method
    
    We should avoid side-effects in the constructor as much as possible. That avoids
    surprising behavior at object instantiation time. The state if needed must be
    initialized into the `swh.lister.pattern.Lister.get_pages` method, as preconized in the
    class docstring.
    
    This also fixes the current test that actually bootstrap a real opam local "clone" in
    /tmp.
    
    Related to T3590

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