Skip to content
Snippets Groups Projects

Ensure the elasticsearch indexes are initialized before the first request

1 unresolved thread
  • Use a flask hook to be sure the index is initialized before performing any action
  • Fix the server tests to avoid a side effect with the global application configuration not reset between 2 tests

Related to swh/infra/sysadm-environment#3076 (closed)


Migrated from D5193 (view on Phabricator)

Merge request reports

Closed by Phabricator Migration userPhabricator Migration user 3 years ago (Mar 3, 2021 5:32pm UTC)

Merge details

  • The changes were not merged into .

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
11 11
12 12 from swh.core.api import RPCServerApp
13 13 from swh.core.config import load_from_envvar
14 from swh.search.api import server
14 15 from swh.search.api.server import load_and_check_config, make_app_from_configfile
15 16
16 17
18 def teardown_function():
19 # Ensure there is no configuration loaded from a previous test
20 server.api_cfg = None
  • Author Maintainer
    • fix wrong error log level
    • fix typo on the commit message
  • Build is green

    Patch application report for D5193 (id=18572)

    Rebasing onto 7c795a60...

    Current branch diff-target is up to date.
    Changes applied before test
    commit 9e0db2bd4fd0713fd61ce6c391ce5190ba3207e3
    Author: Vincent SELLIER <vincent.sellier@softwareheritage.org>
    Date:   Tue Mar 2 10:30:16 2021 +0100
    
        Ensure the elasticsearch indexes are initialized before the first request
        
        - Use a flask hook to be sure the index is initialized before
        performing any action
        - Fix the server tests to avoid a side effect with the global
        application configuration not reset between 2 tests
        
        Related to swh/infra/sysadm-environment#3076

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

  • Merge request was accepted

  • Antoine R. Dumont approved this merge request

    approved this merge request

  • Author Maintainer

    Merge request was merged

  • Please register or sign in to reply
    Loading