comeara / pillar

Pillar manages migrations for your Cassandra data stores.
https://github.com/comeara/pillar
MIT License
111 stars 64 forks source link

Add migrate/initialize/destroy accepting a Session. #7

Closed magro closed 10 years ago

magro commented 10 years ago

This is useful for apps embedding pillar as a library, so that they can provide their already existing session.

pvenable commented 10 years ago

Please add specs for the new functionality.

Also, this one needs to be updated for the session.close change (merge with master doesn't compile).

comeara commented 10 years ago

I like the idea but we will need specs before this can be merged.

magro commented 10 years ago

I just rebased onto current master and added the cluster close stuff.

I also added destroy(session, keyspace), so that each feature accepts DataStore or Session.

Library acceptance specs are added for the session interface (while not each scenario is duplicated, but for each feature only one).

Also changed String.format to String interpolation.

Hopefully it's now ready to be merged and released, thanx! :-)

magro commented 10 years ago

@comeara Can you merge + release this as well, or should I change s.th.?

comeara commented 10 years ago

I'm looking at it right now.

comeara commented 10 years ago

I studied your commits and specs and decided you found a flaw in the design. The CassandraMigrator was doing too much and that made it inflexible with respect to different use cases. So I redesigned the Migrator interface to accept a session rather than a Datastore. Please have a look at f23dde16424bc951a8aae960ee1c6b6909e9aa7d on master and let me know if you see any issues.

I have a couple of cleanup items remaining but the basic shape of the design is in place.

magro commented 10 years ago

Ok, looks good to me. As this is breaking binary compatibility, to you want to conform strictly to semantic versioning when releasing this? Am 22.06.2014 04:56 schrieb "comeara" notifications@github.com:

I studied your commits and specs and decided you found a flaw in the design. The CassandraMigrator was doing too much and that made it inflexible with respect to different use cases. So I redesigned the Migrator interface to accept a session rather than a Datastore. Please have a look at f23dde1 https://github.com/comeara/pillar/commit/f23dde16424bc951a8aae960ee1c6b6909e9aa7d on master and let me know if you see any issues.

I have a couple of cleanup items remaining but the basic shape of the design is in place.

— Reply to this email directly or view it on GitHub https://github.com/comeara/pillar/pull/7#issuecomment-46771051.

comeara commented 10 years ago

A new version with this feature should be available on Central as 2.0.0 in the next couple hours.

magro commented 10 years ago

Awesome, thanks!