Page MenuHomeSoftware Heritage

phabricator/tasks: Fix issue and add optional api_token parameter
ClosedPublic

Authored by anlambert on Mon, Jan 11, 4:32 PM.

Details

Summary

A couple of slight changes for the Phabricator lister task function:

  • Fix task function return type

Previously, the following error was raised when the task has finished
its execution: Object of type ListerStats is not JSON serializable.
So ensure ListerStats object gets converted to dict before returning it.

  • Add optional api_token parameter to listing task function

This is useful when one wants to test the lister in the docker environment.

Diff Detail

Repository
rDLS Listers
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 D4836 (id=17129)

Rebasing onto 9944295729...

Current branch diff-target is up to date.
Changes applied before test
commit d40f48c1823247771b9ad6218c2bd741be5af3cd
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Jan 11 16:27:03 2021 +0100

    phabricator/tasks: Fix task function return type
    
    Previously, the following error was raised when the task has finished
    its execution: "Object of type ListerStats is not JSON serializable".
    
    So ensure ListerStats object get converted to dict before returning it.

commit ce9e49fd6121c6334456d4a7f2814b7bc8f0c2c9
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Jan 11 16:22:17 2021 +0100

    phabricator/tasks: Allow to pass api_token as optional parameter
    
    This is useful when one wants to test the lister in docker environment.

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

Build is green

Patch application report for D4836 (id=17130)

Rebasing onto 9944295729...

Current branch diff-target is up to date.
Changes applied before test
commit 5f9533a2503187595208364faabb995422c18304
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Jan 11 16:27:03 2021 +0100

    phabricator/tasks: Fix task function return type
    
    Previously, the following error was raised when the task has finished
    its execution: "Object of type ListerStats is not JSON serializable".
    
    So ensure ListerStats object gets converted to dict before returning it.

commit ce9e49fd6121c6334456d4a7f2814b7bc8f0c2c9
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Jan 11 16:22:17 2021 +0100

    phabricator/tasks: Allow to pass api_token as optional parameter
    
    This is useful when one wants to test the lister in docker environment.

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

Update:

  • Bump year in license headers
  • Add test for Phabricator lister task function

Build is green

Patch application report for D4836 (id=17131)

Rebasing onto 9944295729...

Current branch diff-target is up to date.
Changes applied before test
commit c7822752967124890ffcec9f5733fd471f0ccdc0
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Jan 11 16:27:03 2021 +0100

    phabricator/tasks: Fix task function return type
    
    Previously, the following error was raised when the task has finished
    its execution: "Object of type ListerStats is not JSON serializable".
    
    So ensure ListerStats object gets converted to dict before returning it.
    
    Also add missing test for task function.

commit b48f71ff932b190c83003488824135b6aa5d22e6
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Mon Jan 11 16:22:17 2021 +0100

    phabricator/tasks: Allow to pass api_token as optional parameter
    
    This is useful when one wants to test the lister in docker environment.

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

This revision is now accepted and ready to land.Mon, Jan 11, 6:44 PM