Page MenuHomeSoftware Heritage

search: Allow to pass empty pattern when searching for origins
ClosedPublic

Authored by anlambert on May 6 2022, 2:11 PM.

Details

Summary

It enables to search for all origins or for all origins with a
specific visit type.

The main purpose here is to allow searching for origins with a
specific visit type without having to specify a URL pattern.

Depends on D7755

Diff Detail

Repository
rDWAPPS Web applications
Branch
origin-search-improvements
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 29134
Build 45547: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 45546: arc lint + arc unit

Unit TestsFailed

TimeTest
634 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.web.tests.api.views.test_origin::Tests / Python tests / test_api_origin_search_empty_pattern
api_client = <rest_framework.test.APIClient object at 0x7f9e11a13d68> archived_origins = [{'type': 'tar', 'url': 'https://many.origins/17'}, {'type': 'tar', 'url': 'https://many.origins/233'}, {'type': 'tar'...gins/172'}, {'type': 'tar', 'url': 'https://many.origins/33'}, {'type': 'tar', 'url': 'https://many.origins/124'}, ...]
272 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.web.tests.api.views.test_origin::Tests / Python tests / test_api_origin_search_empty_pattern_and_visit_type
api_client = <rest_framework.test.APIClient object at 0x7f9e14c60710> archived_origins = [{'type': 'tar', 'url': 'https://many.origins/17'}, {'type': 'tar', 'url': 'https://many.origins/233'}, {'type': 'tar'...gins/172'}, {'type': 'tar', 'url': 'https://many.origins/33'}, {'type': 'tar', 'url': 'https://many.origins/124'}, ...]
21,278 msJenkins > should search all origins for a visit type::Tests / Cypress tests / Run cypress tests / Test origin-search should search all origins for a visit type
CypressError: Timed out retrying after 20000ms: `cy.wait()` timed out waiting `20000ms` for the 1st request to the route: `checkOriginVisits`. No request ever occurred. https://on.cypress.io/wait
21,149 msJenkins > should search all origins when no pattern is provided::Tests / Cypress tests / Run cypress tests / Test origin-search should search all origins when no pattern is provided
CypressError: Timed out retrying after 20000ms: `cy.wait()` timed out waiting `20000ms` for the 1st request to the route: `checkOriginVisits`. No request ever occurred. https://on.cypress.io/wait
456 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.web.tests.add_forge_now.test_migration::Tests / Python tests / test_add_forge_now_allow_no_comment
View Full Test Results (4 Failed · 939 Passed · 5 Skipped)

Event Timeline

Build has FAILED

Patch application report for D7756 (id=28063)

Rebasing onto 54e679c461...

Current branch diff-target is up to date.
Changes applied before test
commit 0b65901ff74819860477749962601da8035ef7cd
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu May 5 10:38:19 2022 +0200

    search: Allow to pass empty pattern when searching for origins
    
    It enables to search for all origins or for all origins with a
    specific visit type.

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1790/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1790/console

Harbormaster returned this revision to the author for changes because remote builds failed.May 6 2022, 2:39 PM
Harbormaster failed remote builds in B29134: Diff 28063!

Build is green

Patch application report for D7756 (id=28069)

Rebasing onto e6a8303eef...

Current branch diff-target is up to date.
Changes applied before test
commit 96cc635cab25f57cbd83689cd4b2395c2b1e4af7
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Thu May 5 10:38:19 2022 +0200

    search: Allow to pass empty pattern when searching for origins
    
    It enables to search for all origins or for all origins with a
    specific visit type.

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

This revision is now accepted and ready to land.May 6 2022, 7:39 PM