kafka-journal
kafka-journal copied to clipboard
Make 3.3.9 version binary compatible with 3.3.8
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.
Pull Request Test Coverage Report for Build 8630665313
Details
- 1 of 5 (20.0%) changed or added relevant lines in 1 file are covered.
- 13 unchanged lines in 9 files lost coverage.
- Overall coverage decreased (-0.1%) to 81.176%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| eventual-cassandra/src/main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/SchemaConfig.scala | 1 | 5 | 20.0% |
| <!-- | Total: | 1 | 5 |
| Totals | |
|---|---|
| Change from base Build 8630645894: | -0.1% |
| Covered Lines: | 3355 |
| Relevant Lines: | 4133 |
💛 - Coveralls
Most of the changes were pushed to master as part of the listed smaller PRs now.