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
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12481
Build 18947: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 18946: arc lint + arc unit

Event Timeline

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.

Will clean up comment.

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

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 edited the summary of this revision. (Show Details)
  • Remove tryouts comments
  • merge some indirection functions

Drop some more failed tryouts comments

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 test plan for this revision. (Show Details)

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.

This revision is now accepted and ready to land.May 26 2020, 2:58 PM

Simplify expected origin computations using a dict

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

(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.