Skip to content

Elasticsearch populate starts before clone finishes #94

Description

@jhanarato

With all volumes removed and the checkout directory deleted, we get this error:

make[1]: Entering directory '/home/jr/Code/elastic-bilara'
Populating Elasticsearch with data..
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/app/search/search.py", line 37, in __init__
    self._populate_index(settings.ES_INDEX, settings.ES_SEGMENTS_INDEX)
  File "/app/search/search.py", line 58, in _populate_index
    self._process_data(index, segments_index)
  File "/app/search/search.py", line 474, in _process_data
    for data in self._yield_data(paths):
                ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/search/search.py", line 123, in _yield_data
    for file_path in iterator:
                     ^^^^^^^^
  File "/app/search/utils.py", line 53, in yield_file_path
    for file in os.listdir(work_dir):
                ^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/app/checkouts/unpublished'
make[1]: *** [Makefile:12: populate_elastic] Error 1
make[1]: Leaving directory '/home/jr/Code/elastic-bilara'
make: *** [Makefile:24: build] Error 2

It seems that the second git clone command in entrypoint.sh does not complete before the application is launched.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions