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

add sbt-reproducible-builds and fix lanucher builds #206

Merged
merged 4 commits into from
Jun 8, 2024

Conversation

Roiocam
Copy link
Member

@Roiocam Roiocam commented Jun 8, 2024

Continue on the #205, resolves: #192

Jar results seem the same:

❯ diff unzip.txt unzip_main.txt
1,2c1,2
< ❯ unzip pekko-persistence-cassandra-launcher_2.13.jar
< Archive:  pekko-persistence-cassandra-launcher_2.13.jar
---
> ❯ unzip pekko-persistence-cassandra-launcher_2.13_main.jar
> Archive:  pekko-persistence-cassandra-launcher_2.13_main.jar
4,6d3
<   inflating: META-INF/LICENSE
<   inflating: META-INF/NOTICE
<   inflating: cassandra-bundle.jar
12a10,12
>   inflating: META-INF/LICENSE
>   inflating: META-INF/NOTICE
>   inflating: cassandra-bundle.jar

and the zipdiff report the same result:

 java -jar ~/Downloads/zipdiff-0.4/build/zipdiff.jar -file1 ./pekko-persistence-cassandra-launcher_2.13.jar -file2 main/pekko-persistence-cassandra-launcher_2.13_main.jar -outputfile diffs.html
截屏2024-06-08 13 04 26
❯ diff META-INF/MANIFEST.MF main/META-INF/MANIFEST.MF
3c3,5
< Implementation-URL: https://pekko.apache.org/
---
> Implementation-Version: 1.1.0-M0+63-fa9370e2-SNAPSHOT
> Specification-Vendor: Apache Software Foundation
> Specification-Title: pekko-persistence-cassandra-launcher
4a7,8
> Specification-Version: 1.1.0-M0+63-fa9370e2-SNAPSHOT
> Implementation-URL: https://pekko.apache.org/
6d9
< Implementation-Version: 1.1.0-M0+67-c7590392-SNAPSHOT
9,11d11
< Specification-Title: pekko-persistence-cassandra-launcher
< Specification-Vendor: Apache Software Foundation
< Specification-Version: 1.1.0-M0+67-c7590392-SNAPSHOT

@Roiocam Roiocam changed the title add sbt-reproducible-builds add sbt-reproducible-builds and fix lanucher builds Jun 8, 2024
@Roiocam Roiocam marked this pull request as ready for review June 8, 2024 03:45
@Roiocam Roiocam requested a review from raboof June 8, 2024 03:50
.disablePlugins(MimaPlugin)
.settings(
name := "pekko-persistence-cassandra-launcher",
Compile / managedResourceDirectories += (cassandraBundle / target).value,
Compile / managedResources += (cassandraBundle / Compile / packageBin).value)
Compile / unmanagedResources += (cassandraBundle / Compile / packageBin).value)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is PR change, can you take a look? thanks @raboof

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does make sense as as those build results are 'unmanaged' from the perspective of the cassandra-launcher build.

I might worry sbt wouldn't correctly pick up that changes to the bundle should trigger a rebuild of the launcher, but perhaps that's sufficiently guaranteed since cassandraBundle / Compile / packageBin is still part of the graph.

In any case I don't think we expect many changes here, and CI shows it works well also when building 'from scratch'. I've also tried various experiments in sbt and didn't see any new/seriously problematic behavior.

For reference: I did notice that sbt clean does not clear cassandra-bundle/target, and it does not get rebuilt when it exists and you're building sbt cassandraLauncher/package, even if you made changes to the definition of the bundler. That was all already the case on the main branch, though, so not a regression.

@Roiocam Roiocam requested review from He-Pin and pjfanning June 8, 2024 05:07
Copy link
Member

@He-Pin He-Pin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@raboof raboof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot for digging into this!

.disablePlugins(MimaPlugin)
.settings(
name := "pekko-persistence-cassandra-launcher",
Compile / managedResourceDirectories += (cassandraBundle / target).value,
Compile / managedResources += (cassandraBundle / Compile / packageBin).value)
Compile / unmanagedResources += (cassandraBundle / Compile / packageBin).value)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does make sense as as those build results are 'unmanaged' from the perspective of the cassandra-launcher build.

I might worry sbt wouldn't correctly pick up that changes to the bundle should trigger a rebuild of the launcher, but perhaps that's sufficiently guaranteed since cassandraBundle / Compile / packageBin is still part of the graph.

In any case I don't think we expect many changes here, and CI shows it works well also when building 'from scratch'. I've also tried various experiments in sbt and didn't see any new/seriously problematic behavior.

For reference: I did notice that sbt clean does not clear cassandra-bundle/target, and it does not get rebuilt when it exists and you're building sbt cassandraLauncher/package, even if you made changes to the definition of the bundler. That was all already the case on the main branch, though, so not a regression.

@raboof raboof merged commit c69cfae into apache:main Jun 8, 2024
12 of 13 checks passed
@Roiocam Roiocam deleted the reproducible-builds branch June 8, 2024 09:18
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.

rethink cassandra-launcher approach
3 participants