Page MenuHomeSoftware Heritage

tasks: Simplify implementation and add tests for listed origins
ClosedPublic

Authored by anlambert on Apr 27 2022, 3:24 PM.

Details

Summary

Recent changes in swh-scheduler add new parameters to the celery tasks
produced from swh.scheduler.model.ListedOrigin instances.

So ensure to handle any new parameters by not hardcoding the expected
ones in task signatures.

Remove unsafe use of unnamed task parameters.

Add new tests checking task parameters produced from ListedOrigin
instances do no raise error when attempting to create a hg loader.

Related to T4187

Diff Detail

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

Event Timeline

Build is green

Patch application report for D7699 (id=27829)

Rebasing onto 18025f1c3c...

Current branch diff-target is up to date.
Changes applied before test
commit 3a551fa90d3a5570f9898b6fde4e61b671d2fc0e
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Apr 27 15:21:47 2022 +0200

    tasks: Simplify implementation and add tests for listed origins
    
    Recent changes in swh-scheduler add new parameters to the celery tasks
    produced from swh.scheduler.model.ListedOrigin instances.
    
    So ensure to handle any new parameters by not hardcoding the expected
    ones in task signatures.
    
    Remove unsafe use of unnamed task parameters.
    
    Add new tests checking task parameters produced from ListedOrigin
    instances do no raise error when attempting to create a hg loader.
    
    Related to T4187

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

This revision is now accepted and ready to land.Apr 27 2022, 4:03 PM