Page MenuHomeSoftware Heritage

Allow to instantiate the service with default indexes configuration
ClosedPublic

Authored by vsellier on Mar 4 2021, 3:21 PM.

Details

Summary

Fix the tests to really call the ElasticSearch's constructor with
no indexes configuration

Related to T3076

Diff Detail

Repository
rDSEA Archive search
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 19695
Build 30566: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 30565: arc lint + arc unit

Event Timeline

ardumont published this revision for review.Mar 4 2021, 3:22 PM
ardumont accepted this revision.
ardumont added a subscriber: ardumont.

Once deployed the familiar "oh no" ;)

Thanks for the fix

This revision is now accepted and ready to land.Mar 4 2021, 3:23 PM

Build has FAILED

Patch application report for D5196 (id=18598)

Rebasing onto 9e0db2bd4f...

Current branch diff-target is up to date.
Changes applied before test
commit 9e89f2c6c89c177522084825d52f41cf31c49246
Author: Vincent SELLIER <vincent.sellier@softwareheritage.org>
Date:   Thu Mar 4 15:16:16 2021 +0100

    Allow to instantiate the service with default indexes configuration
    
    Fix the tests to really call the ElasticSearch's constructor with
    no indexes configuration
    
    Related to T3076

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

Remove the tests because the flask application is not reinitialized
between 2 unit tests and testing the ElasticSearch class instanciation
with different configuration by flask is not working.

The package needs to be refactored to manage the app like in swh-objstorage/swh-vault
instead of via annotations.

Build is green

Patch application report for D5196 (id=18603)

Rebasing onto 9e0db2bd4f...

Current branch diff-target is up to date.
Changes applied before test
commit 84801b3036c20bd633d718c2069018786737fed7
Author: Vincent SELLIER <vincent.sellier@softwareheritage.org>
Date:   Thu Mar 4 15:50:38 2021 +0100

    Allow to instantiate the service with default indexes configuration
    
    Related to T3076

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

The package needs to be refactored to manage the app like in swh-objstorage/swh-vault
instead of via annotations.

yes, those module variable "app" and the decorators working alongside does not help.

Agreed on the needed refactoring to make that code more testable and clear as the modules you mentioned.