Page MenuHomeSoftware Heritage

admin/deposit: Use new deposit private API endpoint to list deposits
ClosedPublic

Authored by anlambert on Apr 11 2022, 5:47 PM.

Details

Summary

Previously, the admin-deposit-list view was retrieving all deposits data
using the /1/private/deposits/ swh-deposit endpoint and was filtering
those client side.

That approach was not efficient at all as the number of deposits
increased.

So from now on, swh-web will simply forward the listing requests to
the new /1/private/deposits/datatables/ endpoint of swh-deposit which
will perform the same filtering and pagination operations as before in
an efficient way.

Also remove code that is now dead and ensure deposit private API base
URL can be set in configuration with or without trailing slash.

Related to T3128

Diff Detail

Repository
rDWAPPS Web applications
Branch
deposit-list-datatables-update
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 28385
Build 44387: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 44386: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D7550 (id=27371)

Rebasing onto 27f954f8b1...

Current branch diff-target is up to date.
Changes applied before test
commit 96b38d99363341ff8291ca987beaf16409ddaf0e
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Mar 30 18:07:47 2022 +0200

    admin/deposit: Use new deposit private API endpoint to list deposits
    
    Previously, the admin-deposit-list view was retrieving all deposits data
    using the /1/private/deposits/ swh-deposit endpoint and was filtering
    those client side.
    
    That approach was not efficient at all as the number of deposits
    increased.
    
    So from now on, swh-web will simply forward the listing requests to
    the new /1/private/deposits/datatables/ endpoint of swh-deposit which
    will perform the same filtering and pagination operations as before in
    an efficient way.
    
    Also remove code that is now dead and ensure deposit private API base
    URL can be set in configuration with or without trailing slash.
    
    Related to T3128

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

This revision is now accepted and ready to land.Apr 11 2022, 7:26 PM