Skip to content

Commit

Permalink
fix(test): cherry-pick #1830 #1835 (#1836)
Browse files Browse the repository at this point in the history
* chore(workflows): add e2e base image release (#1830)

Signed-off-by: Robin Han <[email protected]>

* fix(test): fix rolling_update_test e2e (#1835)

Signed-off-by: Robin Han <[email protected]>

---------

Signed-off-by: Robin Han <[email protected]>
  • Loading branch information
superhx authored Aug 16, 2024
1 parent 0c2a2a3 commit a09399e
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 8 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/e2e-docker-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: E2E Docker Release

on:
workflow_dispatch:

jobs:
docker-release:
name: Docker Image Release
strategy:
matrix:
platform: [ "ubuntu-22.04" ]
jdk: ["17"]
runs-on: ${{ matrix.platform }}
permissions:
contents: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Determine Image Tags
id: image_tags
run: |
TAG=$(grep default_jdk tests/docker/ducker-ak | grep kos_e2e_base | awk -F ':|"' '{print $3}')
echo "tags=${{ secrets.DOCKERHUB_USERNAME }}/kos_e2e_base:$TAG" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_READ_WRITE_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
file: ./tests/docker/base-Dockerfile
push: true
tags: ${{ steps.image_tags.outputs.tags }}
platforms: linux/amd64,linux/arm64
2 changes: 1 addition & 1 deletion tests/docker/base-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ RUN mkdir -p "/opt/kafka-3.2.3" && chmod a+rw /opt/kafka-3.2.3 && curl -s "$KAFK
RUN mkdir -p "/opt/kafka-3.3.2" && chmod a+rw /opt/kafka-3.3.2 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.3.2.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.3.2"
RUN mkdir -p "/opt/kafka-3.4.1" && chmod a+rw /opt/kafka-3.4.1 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.4.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.4.1"
RUN mkdir -p "/opt/kafka-3.5.2" && chmod a+rw /opt/kafka-3.5.2 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.5.2.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.5.2"
RUN mkdir -p "/opt/kafka-3.6.1" && chmod a+rw /opt/kafka-3.6.1 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.6.1.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.6.1"
RUN mkdir -p "/opt/kafka-3.6.2" && chmod a+rw /opt/kafka-3.6.2 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.6.2.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.6.2"
RUN mkdir -p "/opt/kafka-3.7.0" && chmod a+rw /opt/kafka-3.7.0 && curl -s "$KAFKA_MIRROR/kafka_2.12-3.7.0.tgz" | tar xz --strip-components=1 -C "/opt/kafka-3.7.0"

2 changes: 1 addition & 1 deletion tests/docker/ducker-ak
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ docker_run_memory_limit="3000m"
default_num_nodes=14

# The default OpenJDK base image.
default_jdk="automqinc/kos_e2e_base:3.7.0"
default_jdk="automqinc/kos_e2e_base:3.8.0"

# The default ducker-ak image name.
default_image_name="ducker-ak-kos"
Expand Down
2 changes: 1 addition & 1 deletion tests/docker/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
KAFKA_NUM_CONTAINERS=${KAFKA_NUM_CONTAINERS:-14}
TC_PATHS=${TC_PATHS:-${ESK_TEST_YML:-./kafkatest/}}
TC_GENERAL_MIRROR_URL=${TC_GENERAL_MIRROR_URL:-""}
TC_BASE_IMAGE=${TC_BASE_IMAGE:-"automqinc/kos_e2e_base:3.7.0"}
TC_BASE_IMAGE=${TC_BASE_IMAGE:-"automqinc/kos_e2e_base:3.8.0"}
REBUILD=${REBUILD:f}
DUCKER_TEST_OPTIONS=${DUCKER_TEST_OPTIONS:-""}

Expand Down
5 changes: 0 additions & 5 deletions tests/kafkatest/tests/client/consumer_rolling_upgrade_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ def _verify_roundrobin_assignment(self, consumer):
metadata_quorum=[quorum.isolated_kraft],
use_new_coordinator=[True, False]
)
@matrix(
metadata_quorum=quorum.all_kraft,
use_new_coordinator=[True],
group_protocol=consumer_group.all_group_protocols
)
def rolling_update_test(self, metadata_quorum=quorum.zk, use_new_coordinator=False, group_protocol=None):
"""
Verify rolling updates of partition assignment strategies works correctly. In this
Expand Down

0 comments on commit a09399e

Please sign in to comment.