Page MenuHomeSoftware Heritage

elasticsearch.py: Integrate query langauge translator
ClosedPublic

Authored by KShivendu on Jul 30 2021, 3:13 PM.

Details

Summary

Integrate the query langauge translator in the Elasticsearch implementation

Diff Detail

Repository
rDSEA Archive search
Branch
integrate-translator
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22918
Build 35736: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 35735: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D6046 (id=21872)

Rebasing onto 3428e71a04...

Current branch diff-target is up to date.
Changes applied before test
commit 240ea8f8cbfb09ebcdd17c5ff83a28fa20e804d7
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Fri Jul 30 18:14:50 2021 +0530

    elasticsearch.py: Integrate query langauge translator
    
    Summary:
    Integrate the query langauge translator in the Elasticsearch implementation
    
    Test Plan:
    
    Reviewers:
    
    Subscribers:

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

  • origin_search: Use to_raw() to make the objects injectable

Build has FAILED

Patch application report for D6046 (id=21913)

Rebasing onto 5093dd70db...

First, rewinding head to replay your work on top of it...
Applying: elasticsearch.py: Integrate query langauge translator
Applying: origin_search: Use to_raw() to make the objects injectable
Changes applied before test
commit 0cb2a2bcb99f806bb13d81fdc20a453451a1d3fa
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Wed Aug 4 15:05:38 2021 +0530

    origin_search: Use to_raw() to make the objects injectable

commit 03d56a40f75955e91d9892f060864326e2b5e8e8
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Fri Jul 30 18:14:50 2021 +0530

    elasticsearch.py: Integrate query langauge translator
    
    Integrate the query langauge translator in the Elasticsearch implementation

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

  • utils.py: Use raw string in to_raw documentation (To fix failing tests)

Previous iteration:

  • origin_search: Use to_raw() to make the objects injectable

Build has FAILED

Patch application report for D6046 (id=21914)

Rebasing onto 5093dd70db...

First, rewinding head to replay your work on top of it...
Applying: elasticsearch.py: Integrate query langauge translator
Applying: origin_search: Use to_raw() to make the objects injectable
Applying: utils.py: Use raw string in to_raw documentation
Changes applied before test
commit d497bb01e57fef7296497abc3db1e18565f7d61c
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Wed Aug 4 15:14:51 2021 +0530

    utils.py: Use raw string in to_raw documentation

commit 23cbf67b69c6c87b6709bc58883eb56ac279d725
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Wed Aug 4 15:05:38 2021 +0530

    origin_search: Use to_raw() to make the objects injectable

commit bc5b00fee911b882d60c622990b702cd993801f0
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Fri Jul 30 18:14:50 2021 +0530

    elasticsearch.py: Integrate query langauge translator
    
    Integrate the query langauge translator in the Elasticsearch implementation

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

  • utils.py: Use print() in doc tests for readability
  • translator.py: process escaped chars while parsing
vlorentz added inline comments.
swh/search/utils.py
88

call it unescape

Build is green

Patch application report for D6046 (id=21915)

Rebasing onto 5093dd70db...

First, rewinding head to replay your work on top of it...
Applying: elasticsearch.py: Integrate query langauge translator
Applying: origin_search: Use to_raw() to make the objects injectable
Applying: utils.py: Use raw string in to_raw documentation
Applying: utils.py: Use print() in doc tests for readability
Applying: translator.py: process escaped chars while parsing
Changes applied before test
commit 7573626ec19d379a5bd117c21ce9797f253017b5
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Wed Aug 4 15:57:33 2021 +0530

    translator.py: process escaped chars while parsing

commit be8c1984a265e52d3c58d485ee4eed4dcf37bc21
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Wed Aug 4 15:26:02 2021 +0530

    utils.py: Use print() in doc tests for readability

commit 07ddfffac1b366f654aa447ee857b7805caf5ac5
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Wed Aug 4 15:14:51 2021 +0530

    utils.py: Use raw string in to_raw documentation

commit 6d9be9422f3f533c94ca76d7c38fd46341da8ea0
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Wed Aug 4 15:05:38 2021 +0530

    origin_search: Use to_raw() to make the objects injectable

commit bcaa29fbb6caafc76f8c370369799526e8faeb54
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Fri Jul 30 18:14:50 2021 +0530

    elasticsearch.py: Integrate query langauge translator
    
    Integrate the query langauge translator in the Elasticsearch implementation

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

swh/search/elasticsearch.py
447–456

looks like this isn't covered by tests

  • test_elasticsearch.py: Test for sort_by and limit using the query (and some changes in grammar.js and elasticsearch.py for the same)

Build has FAILED

Patch application report for D6046 (id=21916)

Rebasing onto 5093dd70db...

First, rewinding head to replay your work on top of it...
Applying: elasticsearch.py: Integrate query langauge translator
Changes applied before test
commit 5bddc9aa2a957112a034aa9277d8d000aab2e56c
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Fri Jul 30 18:14:50 2021 +0530

    elasticsearch.py: Integrate query langauge translator
    
    Integrate the query langauge translator in the Elasticsearch implementation

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

there is a typo in the commit message

  • Fix typo in commit message (Thanks @douardda)
  • Moved test_sort_by_and_limit_query from test_search.py to test_elasticsearch.py

Build is green

Patch application report for D6046 (id=21948)

Rebasing onto 5093dd70db...

First, rewinding head to replay your work on top of it...
Applying: elasticsearch.py: Integrate query language translator
Changes applied before test
commit e708766f3c7e2a1405988cc7a818defd5dfc4514
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Fri Jul 30 18:14:50 2021 +0530

    elasticsearch.py: Integrate query language translator
    
    Integrate the query language translator in the Elasticsearch implementation

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

  • Rename to_raw to escape
  • Rename process_escaped to unescape

Build is green

Patch application report for D6046 (id=21955)

Rebasing onto 5093dd70db...

First, rewinding head to replay your work on top of it...
Applying: elasticsearch.py: Integrate query language translator
Changes applied before test
commit 568e247cd63532847165afa65e260c98837ee3f7
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Fri Jul 30 18:14:50 2021 +0530

    elasticsearch.py: Integrate query language translator
    
    Integrate the query language translator in the Elasticsearch implementation

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

This revision is now accepted and ready to land.Aug 6 2021, 12:27 PM

Build is green

Patch application report for D6046 (id=21956)

Rebasing onto 5093dd70db...

Current branch diff-target is up to date.
Changes applied before test
commit b27ee025ccafb77631a0a46de7ceb7b5b8a30836
Author: KShivendu <shivendu@iitbhilai.ac.in>
Date:   Fri Jul 30 18:14:50 2021 +0530

    elasticsearch.py: Integrate query language translator
    
    Integrate the query language translator in the Elasticsearch implementation

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