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

Add orion db upgrade command #293

Merged
merged 2 commits into from
Oct 9, 2019

Conversation

bouthilx
Copy link
Member

@bouthilx bouthilx commented Oct 9, 2019

Why:

There is breaking changes in the DB scheme (mostly importantly in the
unique indexes definition). To fix this, we will provide a command to
upgrade the db scheme explicitely (not implicitly during execution like
we were first attempting). This will avoid breaking DBs and simplify the
handling of backward compatibility in the db.

How:

  • Add checks during DB creation to fail fast if the db is outdated and
    incompatible with current version
  • Add command orion db upgrade to fix the indexes and add missing
    fields (version, priors)

@bouthilx bouthilx added the v0.1.7 label Oct 9, 2019
@bouthilx bouthilx requested a review from Delaunay October 9, 2019 15:05
@bouthilx bouthilx force-pushed the feature/cli_upgrade branch from c7d0ee7 to 7dff1ea Compare October 9, 2019 15:14
Why:

There is breaking changes in the DB scheme (mostly importantly in the
unique indexes definition). To fix this, we will provide a command to
upgrade the db scheme explicitely (not implicitly during execution like
we were first attempting). This will avoid breaking DBs and simplify the
handling of backward compatibility in the db.

How:

- Add checks during DB creation to fail fast if the db is outdated and
incompatible with current version
- Add command `orion db upgrade` to fix the indexes and add missing
fields (version, priors)
Why:

`storage.fetch_experiments` returns documents, not `Experiment` objects.
This makes it complicated to just fetch and update an experiment given
that `update_experiment` expects an `Experiment` object.
@bouthilx bouthilx force-pushed the feature/cli_upgrade branch from 7dff1ea to 1cecc30 Compare October 9, 2019 15:46
@codecov-io
Copy link

Codecov Report

Merging #293 into develop will decrease coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #293      +/-   ##
===========================================
- Coverage    94.67%   94.58%   -0.09%     
===========================================
  Files           62       62              
  Lines         9787     9813      +26     
  Branches       216      218       +2     
===========================================
+ Hits          9266     9282      +16     
- Misses         504      513       +9     
- Partials        17       18       +1
Impacted Files Coverage Δ
tests/unittests/storage/test_legacy.py 100% <ø> (ø) ⬆️
...functional/backward_compatibility/test_versions.py 98.23% <100%> (+0.61%) ⬆️
tests/unittests/storage/test_storage.py 98.92% <100%> (+0.06%) ⬆️
src/orion/core/cli/__init__.py 41.17% <0%> (-58.83%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a054c30...1cecc30. Read the comment docs.

@bouthilx bouthilx merged commit 96a6fcf into Epistimio:develop Oct 9, 2019
@bouthilx
Copy link
Member Author

bouthilx commented Oct 9, 2019

@bouthilx bouthilx mentioned this pull request Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants