juxt / joplin

Flexible datastore migration and seeding for Clojure projects
Eclipse Public License 1.0
316 stars 48 forks source link

Cassandra Migrations Cannot Use Authentication #106

Closed briprowe closed 6 years ago

briprowe commented 6 years ago

The motivation for this PR is to enable users to write migrations against Cassandra clusters that require authentication.

There are 2 commits. The first enables credentials to be passed through the joplin.edn configuration to the Cassandra connection. The second commit ensures that the user's migration code is run against the cluster containing the migration table. By creating one cassandra connection at the beginning of the work and using it both for manipulating ragtime's migration table and handing it to the user's migration code, it can ensure all side effects are applied to the same cluster.

The need for this second commit arose during testing the authentication work. My migration code (which had to create its own cassandra connection) was erroneously configuring itself via mount in my development system. It should have instead been using the configuration that joplin had computed.

We can certainly split this PR into 2 if desired!

Thanks for your work on Joplin!

Update: I pushed a 3rd commit that simply removes dead code.

jonpither commented 6 years ago

Thanks :+1: