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

chore(ci): bump kafka-versions to latest #2346

Merged
merged 1 commit into from Sep 27, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/fvt.yml
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
go-version: [1.18.x]
kafka-version: [2.8.1, 3.0.1, 3.1.1, 3.2.0]
kafka-version: [2.8.2, 3.0.2, 3.1.2, 3.2.3]
env:
DEBUG: true
GOFLAGS: -trimpath
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.kafka
Expand Up @@ -17,10 +17,10 @@ RUN cd /etc/java/java-11-openjdk/*/conf/security \

# https://github.com/apache/kafka/blob/0d518aaed158896ee9ee6949b8f38128d1d73634/tests/docker/Dockerfile#L65-L67
ARG KAFKA_MIRROR="https://s3-us-west-2.amazonaws.com/kafka-packages"
RUN mkdir -p "/opt/kafka-2.8.1" && chmod a+rw /opt/kafka-2.8.1 && curl -s "$KAFKA_MIRROR/kafka_2.12-2.8.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-2.8.1"
RUN mkdir -p "/opt/kafka-3.0.1" && chmod a+rw /opt/kafka-3.0.1 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.0.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.0.1"
RUN mkdir -p "/opt/kafka-3.1.1" && chmod a+rw /opt/kafka-3.1.1 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.1.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.1.1"
RUN mkdir -p "/opt/kafka-3.2.0" && chmod a+rw /opt/kafka-3.2.0 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.2.0.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.2.0"
RUN mkdir -p "/opt/kafka-2.8.2" && chmod a+rw /opt/kafka-2.8.2 && curl -s "$KAFKA_MIRROR/kafka_2.12-2.8.2.tgz" | tar xz --strip-components=1 -C "/opt/kafka-2.8.2"
RUN mkdir -p "/opt/kafka-3.0.2" && chmod a+rw /opt/kafka-3.0.2 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.0.2.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.0.2"
RUN mkdir -p "/opt/kafka-3.1.2" && chmod a+rw /opt/kafka-3.1.2 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.1.2.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.1.2"
RUN mkdir -p "/opt/kafka-3.2.3" && chmod a+rw /opt/kafka-3.2.3 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.2.3.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.2.3"

COPY entrypoint.sh /

Expand Down
10 changes: 5 additions & 5 deletions docker-compose.yml
Expand Up @@ -40,7 +40,7 @@ services:
dockerfile: Dockerfile.kafka
restart: always
environment:
KAFKA_VERSION: ${KAFKA_VERSION:-3.1.1}
KAFKA_VERSION: ${KAFKA_VERSION:-3.1.2}
KAFKA_CFG_ZOOKEEPER_CONNECT: 'zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181'
KAFKA_CFG_LISTENERS: 'LISTENER_INTERNAL://:9091,LISTENER_LOCAL://:29091'
KAFKA_CFG_ADVERTISED_LISTENERS: 'LISTENER_INTERNAL://kafka-1:9091,LISTENER_LOCAL://localhost:29091'
Expand All @@ -61,7 +61,7 @@ services:
dockerfile: Dockerfile.kafka
restart: always
environment:
KAFKA_VERSION: ${KAFKA_VERSION:-3.1.1}
KAFKA_VERSION: ${KAFKA_VERSION:-3.1.2}
KAFKA_CFG_ZOOKEEPER_CONNECT: 'zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181'
KAFKA_CFG_LISTENERS: 'LISTENER_INTERNAL://:9091,LISTENER_LOCAL://:29092'
KAFKA_CFG_ADVERTISED_LISTENERS: 'LISTENER_INTERNAL://kafka-2:9091,LISTENER_LOCAL://localhost:29092'
Expand All @@ -82,7 +82,7 @@ services:
dockerfile: Dockerfile.kafka
restart: always
environment:
KAFKA_VERSION: ${KAFKA_VERSION:-3.1.1}
KAFKA_VERSION: ${KAFKA_VERSION:-3.1.2}
KAFKA_CFG_ZOOKEEPER_CONNECT: 'zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181'
KAFKA_CFG_LISTENERS: 'LISTENER_INTERNAL://:9091,LISTENER_LOCAL://:29093'
KAFKA_CFG_ADVERTISED_LISTENERS: 'LISTENER_INTERNAL://kafka-3:9091,LISTENER_LOCAL://localhost:29093'
Expand All @@ -103,7 +103,7 @@ services:
dockerfile: Dockerfile.kafka
restart: always
environment:
KAFKA_VERSION: ${KAFKA_VERSION:-3.1.1}
KAFKA_VERSION: ${KAFKA_VERSION:-3.1.2}
KAFKA_CFG_ZOOKEEPER_CONNECT: 'zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181'
KAFKA_CFG_LISTENERS: 'LISTENER_INTERNAL://:9091,LISTENER_LOCAL://:29094'
KAFKA_CFG_ADVERTISED_LISTENERS: 'LISTENER_INTERNAL://kafka-4:9091,LISTENER_LOCAL://localhost:29094'
Expand All @@ -124,7 +124,7 @@ services:
dockerfile: Dockerfile.kafka
restart: always
environment:
KAFKA_VERSION: ${KAFKA_VERSION:-3.1.1}
KAFKA_VERSION: ${KAFKA_VERSION:-3.1.2}
KAFKA_CFG_ZOOKEEPER_CONNECT: 'zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181'
KAFKA_CFG_LISTENERS: 'LISTENER_INTERNAL://:9091,LISTENER_LOCAL://:29095'
KAFKA_CFG_ADVERTISED_LISTENERS: 'LISTENER_INTERNAL://kafka-5:9091,LISTENER_LOCAL://localhost:29095'
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
@@ -1,6 +1,6 @@
#!/bin/bash

KAFKA_VERSION="${KAFKA_VERSION:-3.1.1}"
KAFKA_VERSION="${KAFKA_VERSION:-3.1.2}"
KAFKA_HOME="/opt/kafka-${KAFKA_VERSION}"

if [ ! -d "${KAFKA_HOME}" ]; then
Expand Down
2 changes: 1 addition & 1 deletion functional_test.go
Expand Up @@ -135,7 +135,7 @@ func prepareDockerTestEnvironment(ctx context.Context, env *testEnvironment) err
if version, ok := os.LookupEnv("KAFKA_VERSION"); ok {
env.KafkaVersion = version
} else {
env.KafkaVersion = "3.1.1"
env.KafkaVersion = "3.1.2"
}

c := exec.Command("docker-compose", "up", "-d")
Expand Down
26 changes: 19 additions & 7 deletions utils.go
Expand Up @@ -180,11 +180,17 @@ var (
V2_7_2_0 = newKafkaVersion(2, 7, 2, 0)
V2_8_0_0 = newKafkaVersion(2, 8, 0, 0)
V2_8_1_0 = newKafkaVersion(2, 8, 1, 0)
V2_8_2_0 = newKafkaVersion(2, 8, 2, 0)
V3_0_0_0 = newKafkaVersion(3, 0, 0, 0)
V3_0_1_0 = newKafkaVersion(3, 0, 1, 0)
V3_0_2_0 = newKafkaVersion(3, 0, 2, 0)
V3_1_0_0 = newKafkaVersion(3, 1, 0, 0)
V3_1_0_1 = newKafkaVersion(3, 1, 0, 1)
V3_1_1_0 = newKafkaVersion(3, 1, 1, 0)
V3_1_2_0 = newKafkaVersion(3, 1, 2, 0)
V3_2_0_0 = newKafkaVersion(3, 2, 0, 0)
V3_2_1_0 = newKafkaVersion(3, 2, 1, 0)
V3_2_2_0 = newKafkaVersion(3, 2, 2, 0)
V3_2_3_0 = newKafkaVersion(3, 2, 3, 0)

SupportedVersions = []KafkaVersion{
V0_8_2_0,
Expand Down Expand Up @@ -227,14 +233,20 @@ var (
V2_7_1_0,
V2_8_0_0,
V2_8_1_0,
V2_8_2_0,
V3_0_0_0,
V3_0_1_0,
V3_0_2_0,
V3_1_0_0,
V3_1_0_1,
V3_1_1_0,
V3_1_2_0,
V3_2_0_0,
V3_2_1_0,
V3_2_2_0,
V3_2_3_0,
}
MinVersion = V0_8_2_0
MaxVersion = V3_2_0_0
MaxVersion = V3_2_3_0
DefaultVersion = V1_0_0_0

// reduced set of versions to matrix test
Expand All @@ -251,10 +263,10 @@ var (
V2_5_1_0,
V2_6_2_0,
V2_7_1_0,
V2_8_1_0,
V3_0_1_0,
V3_1_0_1,
V3_2_0_0,
V2_8_2_0,
V3_0_2_0,
V3_1_2_0,
V3_2_3_0,
}
)

Expand Down