Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open_storage on existing empty directory attempts to migrate and fails #7045

Closed
eivindjahren opened this issue Jan 30, 2024 · 2 comments · Fixed by #7484
Closed

open_storage on existing empty directory attempts to migrate and fails #7045

eivindjahren opened this issue Jan 30, 2024 · 2 comments · Fixed by #7484
Assignees
Labels

Comments

@eivindjahren
Copy link
Contributor

eivindjahren commented Jan 30, 2024

Doing open_storage("/tmp/empty_directory", mode="w") results in

WARNING ert.storage.local_storage:local_storage.py:235 Migrating storage at /tmp/empty_directory failed with Unknown storage version
ERROR ert.storage.local_storage:local_storage.py:357 Migrating storage at /tmp/empty_directory failed with Use 'local_storage_set_ert_config' before retrieving the config

This exposes two failures:

  • Attempting to migrate an empty directory will always fail
  • One migration assumes config is available which might not always be the case: 'Use 'local_storage_set_ert_config' before retrieving the config

This can be reproduced with

from ert.storage import open_storage


def test_open_storage_failure(tmp_path, caplog):
    with open_storage(tmp_path, mode="w") as f:
        _ = f.create_experiment()
    assert len(caplog.messages) == 0
@kvashchuka
Copy link
Contributor

@pinkwah is this solved now?

@eivindjahren
Copy link
Contributor Author

eivindjahren commented Feb 9, 2024

This seems to have changed somewhat as of 791fe11, but is still an issue:

WARNING  ert.storage.local_storage:local_storage.py:371 Unknown storage version in '/tmp/tmpd5acm5ei'
ERROR    ert.storage.local_storage:local_storage.py:357 Migrating storage at /tmp/tmpd5acm5ei failed with Use 'local_storage_set_ert_config' before retrieving the config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants