Page MenuHomeSoftware Heritage

loader: Update swh.storage.origin_get call to latest api change
ClosedPublic

Authored by ardumont on Fri, Jul 24, 8:26 AM.

Details

Summary

This also adds loader git test scenarios about the loader's base_url being different than the repo url so the modified code is covered (it was not before).

Related to T645

Test Plan

tox

Diff Detail

Repository
rDLDG Git loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

ardumont created this revision.Fri, Jul 24, 8:26 AM

Build is green

Patch application report for D3608 (id=12703)

Rebasing onto f96ec77193...

Current branch diff-target is up to date.
Changes applied before test
commit b6ad860b61c76fea1d286cd5fd6c0b30c3cbf384
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jul 24 08:19:15 2020 +0200

    loader: Update swh.storage.origin_get call to latest api change
    
    Related to T645

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

ardumont updated this revision to Diff 12704.Fri, Jul 24, 8:47 AM

Add new scenario so the modified code is covered.
Note that the build should fail (need a new storage release)

Build has FAILED

Patch application report for D3608 (id=12704)

Rebasing onto f96ec77193...

Current branch diff-target is up to date.
Changes applied before test
commit f2c45a3f6e9b309937e533d28bb4998c8623cd88
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jul 24 08:19:15 2020 +0200

    loader: Update swh.storage.origin_get call to latest api change
    
    Related to T645

Link to build: https://jenkins.softwareheritage.org/job/DLDG/job/tests-on-diff/48/
See console output for more information: https://jenkins.softwareheritage.org/job/DLDG/job/tests-on-diff/48/console

ardumont edited the summary of this revision. (Show Details)Fri, Jul 24, 8:48 AM
ardumont edited the test plan for this revision. (Show Details)
ardumont updated this revision to Diff 12705.Fri, Jul 24, 8:49 AM

Add missing f prefix on f-string (not that it matters much ;)

Build has FAILED

Patch application report for D3608 (id=12705)

Rebasing onto f96ec77193...

Current branch diff-target is up to date.
Changes applied before test
commit 66e1040ed6be40041e1ceb6b3445aa06748720c3
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jul 24 08:19:15 2020 +0200

    loader: Update swh.storage.origin_get call to latest api change
    
    Related to T645

Link to build: https://jenkins.softwareheritage.org/job/DLDG/job/tests-on-diff/49/
See console output for more information: https://jenkins.softwareheritage.org/job/DLDG/job/tests-on-diff/49/console

vlorentz accepted this revision.Fri, Jul 24, 9:16 AM
This revision is now accepted and ready to land.Fri, Jul 24, 9:16 AM

Why do you need to bump the storage version for this change?

Why do you need to bump the storage version for this change?

because the origin-get currently does not take plain iterable of urls as arguments.
that's D3605 ;)

oh, right, I forgot we didn't already support it

ardumont added a comment.EditedFri, Jul 24, 9:33 AM

Why do you need to bump the storage version for this change?

because the origin-get currently does not take plain iterable of urls as arguments.
that's D3605 ;)

ah, i think you already know that...

I like to make explicit the required change that goes along the code thus the bump alongside the code change.

ardumont updated this revision to Diff 12729.Sun, Jul 26, 5:48 AM

Rebase
(tox still fails)

Build has FAILED

Patch application report for D3608 (id=12729)

Rebasing onto 9b251471c9...

Current branch diff-target is up to date.
Changes applied before test
commit 68e30d5cc6368b8d9c7f6e8e59cad0c8335d304b
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jul 24 08:19:15 2020 +0200

    loader: Update swh.storage.origin_get call to latest api change
    
    Related to T645

Link to build: https://jenkins.softwareheritage.org/job/DLDG/job/tests-on-diff/50/
See console output for more information: https://jenkins.softwareheritage.org/job/DLDG/job/tests-on-diff/50/console

ardumont edited the test plan for this revision. (Show Details)Mon, Jul 27, 8:31 AM

Build is green

Patch application report for D3608 (id=12729)

Rebasing onto 9b251471c9...

Current branch diff-target is up to date.
Changes applied before test
commit 68e30d5cc6368b8d9c7f6e8e59cad0c8335d304b
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Jul 24 08:19:15 2020 +0200

    loader: Update swh.storage.origin_get call to latest api change
    
    Related to T645

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