Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Onyx patch versions should not require new tenancy-id #875

Open
sundbry opened this issue Sep 27, 2018 · 2 comments
Open

Onyx patch versions should not require new tenancy-id #875

sundbry opened this issue Sep 27, 2018 · 2 comments

Comments

@sundbry
Copy link
Contributor

sundbry commented Sep 27, 2018

Upgrading Onyx versions between patches shouldn't require the user to use a new tenancy id. If the cluster-log format changes in an incompatible way, that should require a minor or major version number change. Otherwise, it can be very troublesome migrate job checkpoints, state, etc. to a new tenancy-id.

clojure.lang.ExceptionInfo: Incompatible versions of the Onyx cluster coordination log.
 A new, distinct, :onyx/tenancy-id should be supplied when upgrading or downgrading Onyx. 
{:cluster-version "0.13.3-alpha4", :peer-version "0.13.5"}

I propose that we go ahead and modify the check to ignore differences in major.minor.PATCH versions.

@lbradstreet
Copy link
Member

lbradstreet commented Sep 27, 2018 via email

@sundbry
Copy link
Contributor Author

sundbry commented Sep 27, 2018

What do you think about decoupling the internal data version from the library API version?
In other words, if we ever want to break the tenancy log data structure in an incompatible way, we should increment the internal data structure version. However, this should probably be decoupled from the actual project version, since for example, an upgrade to 0.14.0 or even 1.0.0 might be perfectly compatible with the existing data structures even if there are incompatible API changes or new features.

We might be able to accomplish this in the present form, without too much code, by freezing the version in onyx.peer.log-version and only changing that when the internal data structures change moving forward.

As you mentioned about checking for breaking changes, a good point to start may be to identify which of the schema definitions are used in the persisted data structures. We might be able to programmatically detect then when those schema definitions change. Something like

(def peer-log-schemas {....})

(diff peer-log-schemas previous-peer-log-schemas)

Ultimately though, it will still just be a matter of good design discipline and code review to make sure the internal data versions stay compatible.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants