Page MenuHomeSoftware Heritage

deposit-admin: Filtering out deposits matching an excluding pattern
ClosedPublic

Authored by ardumont on May 25 2020, 9:16 AM.

Details

Summary

The matching is done on all columns values.

Note: The deposit listing api is now also able to exclude directly with a
pattern exclude parameter. Although, to leverage this on web-app side, I fear
that we would need to change the ajax parameter from GET to POST to be able to
dynamically alter query parameter. From my understanding of the documentation,
it seems we can't do that with get. That's the reason why the filtering is done
client side when the server sends the result.

Related to T2406

Replace D3175 (got closed, that other diff is now the supplementary commit to improve
on existing test)

Test Plan
workon swh
cd swh-web
make test-frontend-ui  # click on deposit-admin.spec.js, and look at cypress controlling chromium and asserting stuff work...

Diff Detail

Repository
rDWAPPS Web applications
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.May 25 2020, 9:16 AM
ardumont edited the summary of this revision. (Show Details)May 25 2020, 9:20 AM
ardumont added a project: Web app.

Build is green

Patch application report for D3176 (id=11280)

Rebasing onto 87e7fbc9c2...

Current branch diff-target is up to date.
Changes applied before test
commit 671be5c7053b656bfb5b70f6d7dce05c894cb9aa
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Sat May 23 09:17:37 2020 +0200

    deposit-admin: Filtering out deposits matching an excluding pattern
    
    The matching is only done on the external_id column. A commented implementation
    looking up all columns could be used instead.
    
    Related to T2406

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

ardumont planned changes to this revision.May 25 2020, 2:30 PM

Will clean up comment.

cypress/integration/deposit-admin.spec.js
61

I have some wip about this (but it's not completely stable).
I won't push right now so that fixme will stay for now.

ardumont updated this revision to Diff 11288.May 25 2020, 3:11 PM
ardumont edited the summary of this revision. (Show Details)
  • Remove tryouts comments
  • merge some indirection functions
ardumont edited the summary of this revision. (Show Details)May 25 2020, 3:12 PM
ardumont updated this revision to Diff 11289.May 25 2020, 3:13 PM

Drop some more failed tryouts comments

ardumont updated this revision to Diff 11290.May 25 2020, 3:14 PM

Drop console.log instructions (should be done by the updates now)

Build is green

Patch application report for D3176 (id=11288)

Rebasing onto 87e7fbc9c2...

Current branch diff-target is up to date.
Changes applied before test
commit fb940b4cf945426027466b536a472d64a16440fc
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Sat May 23 09:17:37 2020 +0200

    deposit-admin: Filtering out deposits matching an excluding pattern
    
    The matching is only done on the external_id column. A commented implementation
    looking up all columns could be used instead.
    
    Related to T2406

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

Build is green

Patch application report for D3176 (id=11289)

Rebasing onto 87e7fbc9c2...

Current branch diff-target is up to date.
Changes applied before test
commit cb55ea665178a60d165aacf2c644cadc9a8498ac
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Sat May 23 09:17:37 2020 +0200

    deposit-admin: Filtering out deposits matching an excluding pattern
    
    The matching is only done on the external_id column. A commented implementation
    looking up all columns could be used instead.
    
    Related to T2406

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

Build is green

Patch application report for D3176 (id=11290)

Rebasing onto 87e7fbc9c2...

Current branch diff-target is up to date.
Changes applied before test
commit 84db7f3dcb860477ba1d79f6feac69c6a4fa3620
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Sat May 23 09:17:37 2020 +0200

    deposit-admin: Filtering out deposits matching an excluding pattern
    
    The matching is only done on the external_id column. A commented implementation
    looking up all columns could be used instead.
    
    Related to T2406

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

ardumont edited the summary of this revision. (Show Details)May 25 2020, 7:07 PM
ardumont edited the test plan for this revision. (Show Details)
ardumont edited the summary of this revision. (Show Details)May 25 2020, 10:03 PM
ardumont updated this revision to Diff 11308.May 26 2020, 2:21 PM

Add more comments on functions in production code

Build is green

Patch application report for D3176 (id=11308)

Rebasing onto 87e7fbc9c2...

Current branch diff-target is up to date.
Changes applied before test
commit 7d246ec2e50866feeee6c9b0c1dc25d26afd2438
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Sat May 23 09:17:37 2020 +0200

    deposit-admin: Filtering out deposits matching an excluding pattern
    
    All string columns are checked againt the excluding pattern.
    
    Related to T2406

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

vlorentz accepted this revision.May 26 2020, 2:58 PM
This revision is now accepted and ready to land.May 26 2020, 2:58 PM
ardumont updated this revision to Diff 11309.May 26 2020, 3:05 PM

Simplify expected origin computations using a dict

cypress/integration/deposit-admin.spec.js
61

(was speaking about the FIXME, this comment is now out of sync...)

Build is green

Patch application report for D3176 (id=11309)

Rebasing onto 87e7fbc9c2...

Current branch diff-target is up to date.
Changes applied before test
commit 3b0967172738882ebc25eca5cb78ca8310131ca2
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Sat May 23 09:17:37 2020 +0200

    deposit-admin: Filtering out deposits matching an excluding pattern
    
    All string columns are checked againt the excluding pattern.
    
    Related to T2406

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