Page MenuHomeSoftware Heritage

tasks: Simplify implementation and add tests for listed origins
ClosedPublic

Authored by anlambert on Apr 27 2022, 4:10 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 cvs loader.

Related to T4187

Diff Detail

Repository
rDLDCVS CVS Loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vlorentz accepted this revision.
vlorentz added a subscriber: vlorentz.

thanks!

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

Build is green

Patch application report for D7702 (id=27833)

Rebasing onto 3a99ed0df9...

Current branch diff-target is up to date.
Changes applied before test
commit 4fc652339e92db5691bb3c96a6b0581e7b278da1
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Apr 27 16:09:53 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 cvs loader.
    
    Related to T4187

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