Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make 3.3.9 version binary compatible with 3.3.8 #586

Closed
wants to merge 4 commits into from

Conversation

rtar
Copy link
Contributor

@rtar rtar commented Feb 28, 2024

Note

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

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 rtar added this to the snapshotter milestone Feb 28, 2024
@coveralls
Copy link

coveralls commented Feb 28, 2024

@rtar rtar force-pushed the binary-compatibility branch 2 times, most recently from b1e6a5e to 2da953d Compare March 12, 2024 13:33
rtar added a commit that referenced this pull request Mar 19, 2024
The idea is to restore binary backwards compatibility of `SchemaConfig`.

`SchemaConfig.Keyspace` is restored for that purposes and the method is
added to convert it to `KeyspaceConfig`.

The class itself is marked as deprecated and is planned to be removed in
a next non-binary-compatible release.

This is a smaller PR split from #586 for easier review.
rtar added a commit that referenced this pull request Mar 19, 2024
The idea is to restore binary backwards compatibility of `SchemaConfig`.

`SchemaConfig.Keyspace` is restored for that purposes and the method is
added to convert it to `KeyspaceConfig`.

The class itself is marked as deprecated and is planned to be removed in
a next non-binary-compatible release.

This is a smaller PR split from #586 for easier review.
@rtar rtar force-pushed the binary-compatibility branch 4 times, most recently from 7f68fea to 53d2aa2 Compare March 25, 2024 14:53
rtar added a commit that referenced this pull request Apr 10, 2024
This is the last PR in the series, including code cleanup changes that
did not suit for previous PRs.
@rtar rtar mentioned this pull request Apr 10, 2024
rtar added a commit that referenced this pull request Apr 10, 2024
This is the last PR in the series, including code cleanup changes that
did not suit for previous PRs.
Also configure `sbt-version-policy` to check that this is the case.

Run `sbt versionPolicyCheck` to validate.

# Conflicts:
#	tests/src/test/scala/com/evolutiongaming/kafka/journal/SettingsIntSpec.scala

# Conflicts:
#	cassandra/src/main/scala/com/evolutiongaming/kafka/journal/cassandra/SettingStatements.scala
#	cassandra/src/main/scala/com/evolutiongaming/kafka/journal/cassandra/SettingsCassandra.scala
#	cassandra/src/test/resources/com/evolutiongaming/kafka/journal/cassandra/cassandra-consistency-config.conf
#	cassandra/src/test/resources/com/evolutiongaming/kafka/journal/cassandra/consistency-config.conf
#	cassandra/src/test/resources/com/evolutiongaming/kafka/journal/eventual/cassandra/consistency-config.conf
#	cassandra/src/test/scala/com/evolutiongaming/kafka/journal/cassandra/CassandraConsistencyConfigSpec.scala

# Conflicts:
#	cassandra/src/test/scala/com/evolutiongaming/kafka/journal/cassandra/CassandraHealthCheckSpec.scala

# Conflicts:
#	eventual-cassandra/src/main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/SchemaConfig.scala
#	eventual-cassandra/src/main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/SetupSchema.scala

# Conflicts:
#	cassandra/src/main/scala/com/evolutiongaming/kafka/journal/cassandra/CassandraSync.scala

# Conflicts:
#	cassandra/src/main/scala/com/evolutiongaming/kafka/journal/cassandra/CassandraSync.scala
#	cassandra/src/test/scala/com/evolutiongaming/kafka/journal/cassandra/CreateTablesSpec.scala
#	eventual-cassandra/src/main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/SetupSchema.scala

# Conflicts:
#	cassandra/src/test/scala/com/evolutiongaming/kafka/journal/cassandra/SettingsCassandraSpec.scala
#	tests/src/test/scala/com/evolutiongaming/kafka/journal/SettingsIntSpec.scala

# Conflicts:
#	eventual-cassandra/src/main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/CreateSchema.scala
#	eventual-cassandra/src/main/scala/com/evolutiongaming/kafka/journal/eventual/cassandra/SchemaConfig.scala
@rtar
Copy link
Contributor Author

rtar commented Apr 11, 2024

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

@rtar rtar closed this Apr 11, 2024
@rtar rtar deleted the binary-compatibility branch April 11, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants