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

docker: updates zipkin-cassandra test image to 4.1.8 #3794

Merged
merged 2 commits into from
Feb 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions docker/test-images/zipkin-cassandra/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ FROM ghcr.io/openzipkin/java:${java_version} as install
# Use latest stable version: https://cassandra.apache.org/download/
# This is defined in many places because Docker has no "env" script functionality unless you use
# docker-compose: When updating, update everywhere.
# TODO: revlocked, so probably put effort into 5.x instead
ARG cassandra_version=4.1.7
ARG cassandra_version=4.1.8
ENV CASSANDRA_VERSION=$cassandra_version
WORKDIR /install

Expand All @@ -36,7 +35,7 @@ RUN /tmp/install.sh && rm /tmp/install.sh

FROM ghcr.io/openzipkin/java:${java_version}-jre as zipkin-cassandra
LABEL org.opencontainers.image.description="Cassandra on OpenJDK and Alpine Linux with Zipkin keyspaces pre-installed"
ARG cassandra_version=4.1.7
ARG cassandra_version=4.1.8
LABEL cassandra-version=$cassandra_version
ENV CASSANDRA_VERSION=$cassandra_version

Expand Down
20 changes: 19 additions & 1 deletion docker/test-images/zipkin-cassandra/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ cat > pom.xml <<-'EOF'
<groupId>net.java.dev.jna</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>com.github.jbellis</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>*</artifactId>
Expand All @@ -49,6 +53,12 @@ cat > pom.xml <<-'EOF'
<artifactId>jna</artifactId>
<version>5.16.0</version>
</dependency>
<!-- Use latest to work with JRE 21 per CASSANDRA-18329 -->
<dependency>
<groupId>com.github.jbellis</groupId>
<artifactId>jamm</artifactId>
<version>0.4.0</version>
</dependency>
<!-- log4j not logback -->
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -63,6 +73,14 @@ mvn -q --batch-mode -DoutputDirectory=lib \
org.apache.maven.plugins:maven-dependency-plugin:3.8.1:copy-dependencies
rm pom.xml

# Get a version of ObjectSizes.java that compiles with jamm 0.4.0
wget --random-wait --tries=5 -qO ObjectSizes.java \
https://raw.githubusercontent.com/apache/cassandra/refs/tags/cassandra-5.0.3/src/java/org/apache/cassandra/utils/ObjectSizes.java
# Rename a public method back to the same name as used in Cassandra 4.1.
sed -i 's/sizeOnHeapExcludingDataOf/sizeOnHeapExcludingData/g' ObjectSizes.java
# Compile it into classes, which overrides the same class from Cassandra 4.1.
javac -cp 'lib/*' -d classes ObjectSizes.java
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 works as some time in the past we were already adding classes. So, "classes" is already in the run scripts else startup would fail.


# Make sure you use relative paths in references like this, so that installation
# is decoupled from runtime
mkdir -p conf data commitlog saved_caches hints triggers
Expand Down Expand Up @@ -116,7 +134,7 @@ sed -i '/read_repair_chance/d' schema
#
# Merging makes adding Cassandra v5 easier and lets us share a common JRE 17+
# with other test images even if Cassandra v4 will never officially support it.
# https://github.com/apache/cassandra/blob/cassandra-4.1.7/conf/jvm11-server.options
# https://github.com/apache/cassandra/blob/cassandra-4.1.8/conf/jvm11-server.options
# https://github.com/apache/cassandra/blob/cassandra-5.0.3/conf/jvm17-server.options
#
# Finally, we allow security manager to prevent JRE 21 crashing when Cassandra
Expand Down
Loading