Page MenuHomeSoftware Heritage

Integrate with swh-search and add a search entrypoint
ClosedPublic

Authored by jayeshv on Aug 19 2022, 9:31 AM.

Details

Summary

Search in the origin URLs for the given query.
Initial integration; this does not support advanced query language
or filtering by visit type.

Related to T4263

Diff Detail

Repository
rDGQL GraphQL API
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 D8260 (id=29835)

Rebasing onto 8e9cf5e069...

Current branch diff-target is up to date.
Changes applied before test
commit c14118da2dd6639313894605b44d0ccd866d74b1
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Fri Aug 19 09:23:18 2022 +0200

    Integrate with swh-search and add a search entrypoint
    
    Search accepts a query and an object type.
    Currently supports only the origin type.
    
    Related to T4263

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

Build has FAILED

Patch application report for D8260 (id=29863)

Rebasing onto 8e9cf5e069...

Current branch diff-target is up to date.
Changes applied before test
commit e59ed630d19eef684365a431531a73c0d01ae798
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Fri Aug 19 09:23:18 2022 +0200

    Integrate with swh-search and add a search entrypoint
    
    Search accepts a query and an object type.
    Currently supports only the origin type.
    
    Related to T4263

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

Build is green

Patch application report for D8260 (id=29864)

Rebasing onto 8e9cf5e069...

Current branch diff-target is up to date.
Changes applied before test
commit a12a3dc411aa946ae1f960a10fdae2160bf90250
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Fri Aug 19 09:23:18 2022 +0200

    Integrate with swh-search and add a search entrypoint
    
    Search accepts a query and an object type.
    Currently supports only the origin type.
    
    Related to T4263

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

Build is green

Patch application report for D8260 (id=29885)

Rebasing onto 8e9cf5e069...

Current branch diff-target is up to date.
Changes applied before test
commit 24c7c3ba3c9365b37b6b526436a85ceda2c44c12
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Fri Aug 19 09:23:18 2022 +0200

    Integrate with swh-search and add a search entrypoint
    
    Search accepts a query and an object type.
    Currently supports only the origin type.
    
    Related to T4263

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

Build is green

Patch application report for D8260 (id=29899)

Rebasing onto 8e9cf5e069...

Current branch diff-target is up to date.
Changes applied before test
commit 4a8150d11c2d4de2d9e7212c532950abc6b163d0
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Fri Aug 19 09:23:18 2022 +0200

    Integrate with swh-search and add a search entrypoint
    
    Search in the origin URLs for the given query.
    Initial integration; this does not support advanced query language
    or filtering by visit type.
    
    Related to T4263

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

remove unused enum in schema

jayeshv retitled this revision from WIP: Integrate with swh-search and add a search entrypoint to Integrate with swh-search and add a search entrypoint.Aug 22 2022, 3:59 PM
jayeshv edited the summary of this revision. (Show Details)

Build is green

Patch application report for D8260 (id=29901)

Rebasing onto 8e9cf5e069...

Current branch diff-target is up to date.
Changes applied before test
commit 8af29bcfc88f2a5160d4281672c5d8f69042cc21
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Fri Aug 19 09:23:18 2022 +0200

    Integrate with swh-search and add a search entrypoint
    
    Search in the origin URLs for the given query.
    Initial integration; this does not support advanced query language
    or filtering by visit type.
    
    Related to T4263

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

anlambert added inline comments.
swh/graphql/tests/functional/test_search.py
14

Could you also add the target_hash field in the query result ? Maybe you could pick the first origin URL in your tests data and use it as the value of the query parameter ?

Also the target_hash naming looks weird here as we return an URL and not a checksum. Maybe it could be renamed to value which feels more generic and combine well with type field ?

Build is green

Patch application report for D8260 (id=29908)

Rebasing onto 8e9cf5e069...

Current branch diff-target is up to date.
Changes applied before test
commit 3e1127364889c5d7ebc06e96d96456b0323e4838
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Fri Aug 19 09:23:18 2022 +0200

    Integrate with swh-search and add a search entrypoint
    
    Search in the origin URLs for the given query.
    Initial integration; this does not support advanced query language
    or filtering by visit type.
    
    Related to T4263

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

swh/graphql/tests/functional/test_search.py
14

Added the target object in the test.
I renamed target_hash in the code (while resolving origins) to target_url. It will be a problem only when we add some attributes to the SearchResultNode object. I will find a solution by then.

This revision is now accepted and ready to land.Aug 22 2022, 4:26 PM