kafka-journal icon indicating copy to clipboard operation
kafka-journal copied to clipboard

Make 3.3.9 version binary compatible with 3.3.8

Open rtar opened this issue 1 year ago • 1 comments

Note

The pull request will now be split to several smaller pull requests (feel free to review them instead):

  • https://github.com/evolution-gaming/kafka-journal/pull/587
  • https://github.com/evolution-gaming/kafka-journal/pull/588
  • https://github.com/evolution-gaming/kafka-journal/pull/593
  • https://github.com/evolution-gaming/kafka-journal/pull/594
  • https://github.com/evolution-gaming/kafka-journal/pull/595
  • https://github.com/evolution-gaming/kafka-journal/pull/598
  • https://github.com/evolution-gaming/kafka-journal/pull/599
  • https://github.com/evolution-gaming/kafka-journal/pull/600
  • https://github.com/evolution-gaming/kafka-journal/pull/601
  • https://github.com/evolution-gaming/kafka-journal/pull/602
  • https://github.com/evolution-gaming/kafka-journal/pull/604

Big Idea

The big idea is to make 3.3.9 version binary compatible with 3.3.8 and also configure sbt-version-policy to check that this is the case.

Run sbt versionPolicyCheck to validate.

CC: @t3hnar

Details

I had to update build.sbt with a temporary hack which creates a separate mima-classes directory for journal and eventual-cassandra modules to make sure that core and cassandra module classes are included as in 3.3.8 version these classes were located together. That hack won't be necessary in 3.3.10 anymore.

I have moved the following classes into com.evolutiongaming.kafka.journal.cassandra package in cassandra module:

CassandraConsistencyConfig.scala
CassandraHealthCheck.scala
CassandraSync.scala
CreateKeyspace.scala
CreateTables.scala
KeyspaceConfig.scala
MigrateSchema.scala
SettingsCassandra.scala
SettingStatements.scala

Then I have created deprecated copies of these classes in com.evolutiongaming.kafka.journal.eventual.cassandra package in eventual-cassandra module and used the old method signatures + converters there.

I had to create them in eventual-cassandra module (not in cassandra module) because some of these old signatures depend on eventual-cassandra classes, still.

All the methods of these deprecated classes call the methods of new classes to ensure there is no duplication of the logic.

Rollbacks

I decided to not create copies of the following classes and just rolled them back to binary compatible state. I suppose we could update them when doing non-binary-compatible release.

main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/CassandraHealthCheck.scala
main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/SetupSchema.scala
main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/ReplicatedCassandra.scala
main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/SettingsCassandra.scala
main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/MetaJournalStatements.scala
main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/JournalStatements.scala
main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/EventualCassandra.scala
main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/SettingStatements.scala
main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/PointerStatements.scala
main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/Pointer2Statements.scala
test/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/EventualCassandraConfigSpec.scala

The reason for such decision is that these are not used in an upcoming snapshotter plugin.

rtar avatar Feb 28 '24 14:02 rtar

Most of the changes were pushed to master as part of the listed smaller PRs now.

rtar avatar Apr 11 '24 09:04 rtar