From 09254f0e83e74891e5025874e5e47f1622235c0f Mon Sep 17 00:00:00 2001 From: Jiyong Huang Date: Thu, 22 Aug 2024 17:49:07 +0800 Subject: [PATCH 1/2] chore(ci): update actions Signed-off-by: Jiyong Huang --- .github/workflows/build_base_image.yaml | 10 ++--- .github/workflows/build_packages.yaml | 57 ++++++++++++++----------- .github/workflows/deploy_docs.yaml | 2 +- .github/workflows/run_fvt_tests.yaml | 28 ++++++------ .github/workflows/run_test_case.yaml | 22 +++++----- extensions/sources/random/random.yaml | 2 +- 6 files changed, 64 insertions(+), 57 deletions(-) diff --git a/.github/workflows/build_base_image.yaml b/.github/workflows/build_base_image.yaml index 928ce3dba5..9e04f8c847 100644 --- a/.github/workflows/build_base_image.yaml +++ b/.github/workflows/build_base_image.yaml @@ -28,9 +28,9 @@ jobs: - 1.22.1 steps: - - uses: actions/checkout@v3 - - uses: docker/setup-buildx-action@v2 - - uses: docker/setup-qemu-action@v2 + - uses: actions/checkout@v4 + - uses: docker/setup-buildx-action@v3 + - uses: docker/setup-qemu-action@v3 with: image: tonistiigi/binfmt:latest platforms: all @@ -44,7 +44,7 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ github.token }} - - uses: docker/build-push-action@v4 + - uses: docker/build-push-action@v6 if: matrix.os == 'debian' with: push: true @@ -55,7 +55,7 @@ jobs: build-args: GO_VERSION=${{ matrix.golang }} tags: ghcr.io/${{ github.repository }}/base:${{ matrix.golang }}-${{ matrix.os }} file: .github/dockerfile/Dockerfile.${{ matrix.os }} - - uses: docker/build-push-action@v4 + - uses: docker/build-push-action@v6 if: matrix.os == 'alpine' with: push: true diff --git a/.github/workflows/build_packages.yaml b/.github/workflows/build_packages.yaml index 7ad49d8ddf..638697af68 100644 --- a/.github/workflows/build_packages.yaml +++ b/.github/workflows/build_packages.yaml @@ -39,11 +39,11 @@ jobs: - debian steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: docker/setup-qemu-action@v2 - - uses: docker/setup-buildx-action@v2 + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 - name: build if: matrix.os == 'debian' run: | @@ -57,7 +57,7 @@ jobs: - name: create sha file run: | cd _packages && for var in $(ls); do sudo bash -c "echo $(sha256sum $var | awk '{print $1}') > $var.sha256"; done && cd - - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: packages path: _packages/ @@ -66,23 +66,23 @@ jobs: runs-on: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: go-version: '1.22.1' - name: prepare run: | - brew install curl zip unzip gnu-sed pkg-config zmq + brew install zip unzip gnu-sed zmq echo "/usr/local/bin:$PATH" >> ~/.bashrc - name: build run: | make pkg cd _packages && for var in $(ls); do openssl dgst -sha256 $var | awk '{print $2}' > $var.sha256; done && cd - - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: packages + name: mac_packages path: _packages/ build-docker-images: @@ -102,17 +102,17 @@ jobs: - 1.22.1 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: docker/setup-buildx-action@v2 - - uses: docker/setup-qemu-action@v2 + - uses: docker/setup-buildx-action@v3 + - uses: docker/setup-qemu-action@v3 with: image: tonistiigi/binfmt:latest platforms: all - name: Build single platform image if: endsWith( matrix.suffix, 'python') == false - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64 @@ -131,7 +131,7 @@ jobs: docker logs ekuiper exit 1 fi - - uses: docker/metadata-action@v4 + - uses: docker/metadata-action@v5 id: meta with: images: docker.io/lfedge/ekuiper @@ -151,7 +151,7 @@ jobs: password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Build multi platform image if: contains(fromJSON('["release", "workflow_dispatch"]'), github.event_name) - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64,linux/arm64,linux/arm/v7 @@ -165,16 +165,16 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: docker/setup-buildx-action@v2 - - uses: docker/setup-qemu-action@v2 + - uses: docker/setup-buildx-action@v3 + - uses: docker/setup-qemu-action@v3 with: image: tonistiigi/binfmt:latest platforms: all - name: Build single platform image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64 @@ -187,7 +187,7 @@ jobs: docker run -d --name kuiper-kubernetes-tool docker.io/lfedge/ekuiper-kubernetes-tool sleep 5 if [[ "$(docker logs kuiper-kubernetes-tool)" != *"Kuiper kubernetes tool is started successfully!"* ]]; then exit 1; fi - - uses: docker/metadata-action@v4 + - uses: docker/metadata-action@v5 id: meta with: images: docker.io/lfedge/ekuiper-kubernetes-tool @@ -205,7 +205,7 @@ jobs: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_TOKEN }} - name: Build multi platform image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6 with: context: . platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/386 @@ -222,11 +222,15 @@ jobs: - build-on-mac steps: - - uses: actions/checkout@v3 - - uses: actions/download-artifact@v1 + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 with: name: packages path: _packages + - uses: actions/download-artifact@v4 + with: + name: mac_packages + path: _packages - name: check packages run: | cd _packages && for var in $( ls |grep -v sha256); do @@ -260,9 +264,12 @@ jobs: -X POST \ -d "{\"repo\":\"lf-edge/ekuiper\", \"tag\": \"${{ github.ref_name }}\" }" \ ${{ secrets.EMQX_IO_RELEASE_API }} - - uses: geekyeggo/delete-artifact@v2 + - uses: geekyeggo/delete-artifact@v5 with: name: packages - - uses: geekyeggo/delete-artifact@v2 + - uses: geekyeggo/delete-artifact@v5 + with: + name: mac_packages + - uses: geekyeggo/delete-artifact@v5 with: name: plugins diff --git a/.github/workflows/deploy_docs.yaml b/.github/workflows/deploy_docs.yaml index ac95ebe09c..efe39a8073 100644 --- a/.github/workflows/deploy_docs.yaml +++ b/.github/workflows/deploy_docs.yaml @@ -33,7 +33,7 @@ jobs: path: frontend - name: use python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.8 diff --git a/.github/workflows/run_fvt_tests.yaml b/.github/workflows/run_fvt_tests.yaml index cbc9d307a5..025dbfff35 100644 --- a/.github/workflows/run_fvt_tests.yaml +++ b/.github/workflows/run_fvt_tests.yaml @@ -36,10 +36,10 @@ jobs: - 18083:18083 steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: go-version: '1.22' - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: zulu java-version: '8' # The JDK version to make available on the path. @@ -73,7 +73,7 @@ jobs: fi; tar -zxvf /tmp/TDengine-client-$TD_VERSION.tar.gz cd TDengine-client-$TD_VERSION && ./install_client.sh - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: build kuiper run: | sudo apt-get update && sudo apt-get install pkg-config libczmq-dev -y @@ -86,12 +86,12 @@ jobs: - name: run fvt tests timeout-minutes: 12 run: ./test/run_jmeter.sh with_edgex=true - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: kuiper_logs_with_edgex path: ${{ env.KUIPER_LOG_PATH }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: jmeter_logs_with_edgex @@ -117,7 +117,7 @@ jobs: run: | go tool covdata textfmt -i=cover -o=jmeter.xml - name: upload coverage report for jmeter - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: jmeter_coverage path: jmeter.xml @@ -147,10 +147,10 @@ jobs: - 18083:18083 steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: go-version: '1.22' - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: zulu java-version: '8' # The JDK version to make available on the path. @@ -167,7 +167,7 @@ jobs: echo "jmeter.save.saveservice.response_data.on_error=true" >> /tmp/apache-jmeter-$JMETER_VERSION/user.properties wget -O /tmp/apache-jmeter-$JMETER_VERSION/lib/ext/mqtt-xmeter-1.13-jar-with-dependencies.jar https://github.com/emqx/mqtt-jmeter/raw/master/Download/v1.13.0/mqtt-xmeter-1.13-jar-with-dependencies.jar ln -s /tmp/apache-jmeter-$JMETER_VERSION /opt/jmeter - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: build kuiper run: | make build_with_cover @@ -188,12 +188,12 @@ jobs: fvt_dir=`pwd` /opt/jmeter/bin/jmeter.sh -Jjmeter.save.saveservice.output_format=xml -n -t test/redis_kv_storage.jmx -Dfvt="$fvt_dir" -l jmeter_logs/redis_kv_storage.jtl -j jmeter_logs/redis_kv_storage.log - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: kuiper_logs_redis_storage path: ${{ env.KUIPER_LOG_PATH }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: jmeter_logs_redis_storage @@ -219,7 +219,7 @@ jobs: run: | go tool covdata textfmt -i=cover -o=jmeter_redis.xml - name: upload coverage report for jmeter redis - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: jmeter_redis_coverage path: jmeter_redis.xml @@ -228,8 +228,8 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: distribution: zulu java-version: '8' # The JDK version to make available on the path. diff --git a/.github/workflows/run_test_case.yaml b/.github/workflows/run_test_case.yaml index e56af857e6..90fb84150e 100644 --- a/.github/workflows/run_test_case.yaml +++ b/.github/workflows/run_test_case.yaml @@ -21,11 +21,11 @@ jobs: run_unit_tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 with: go-version: '1.22' - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.x' - name: Install dependencies @@ -60,13 +60,13 @@ jobs: make failpoint-enable go test -trimpath -tags="edgex msgpack script parquet test" --cover -covermode=atomic -coverpkg=./... -coverprofile=coverage.xml $(go list ./... | grep -v "github.com/lf-edge/ekuiper/v2/fvt") make failpoint-disable - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: failure() with: name: stream.log path: log/stream.log - name: upload coverage report for ut - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: coverage path: coverage.xml @@ -77,13 +77,13 @@ jobs: - name: Run fvt run: | go test -trimpath -tags="edgex msgpack script parquet" --cover -covermode=atomic -coverpkg=./... -coverprofile=fvt_coverage.xml ./fvt - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: failure() with: name: streamFvt.log path: log/stream.log - name: upload coverage report for fvt - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: fvt_coverage path: fvt_coverage.xml @@ -98,22 +98,22 @@ jobs: runs-on: ubuntu-latest steps: - name: Download ut coverage reports - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: coverage path: ./ - name: Download fvt coverage reports - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: fvt_coverage path: ./ - name: Download jmeter coverage reports - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: jmeter_coverage path: ./ - name: Download jmeter redis coverage reports - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: jmeter_redis_coverage path: ./ diff --git a/extensions/sources/random/random.yaml b/extensions/sources/random/random.yaml index 494e79e326..353a35c44d 100644 --- a/extensions/sources/random/random.yaml +++ b/extensions/sources/random/random.yaml @@ -6,7 +6,7 @@ default: deduplicate: 0 ext: - interval: 150 + interval: 500 dedup: interval: 100 From 11a28053a2af7c7447172b522c8cabfeb0daf087 Mon Sep 17 00:00:00 2001 From: Jiyong Huang Date: Fri, 23 Aug 2024 10:11:44 +0800 Subject: [PATCH 2/2] chore: fix docker file env lint Signed-off-by: Jiyong Huang --- deploy/docker/Dockerfile-dev | 4 ++-- deploy/docker/Dockerfile-full | 4 ++-- deploy/docker/Dockerfile-slim | 4 ++-- deploy/docker/Dockerfile-slim-python | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deploy/docker/Dockerfile-dev b/deploy/docker/Dockerfile-dev index 9d7fedc7bd..60c33da606 100644 --- a/deploy/docker/Dockerfile-dev +++ b/deploy/docker/Dockerfile-dev @@ -30,8 +30,8 @@ RUN ln -s /go/kuiper/deploy/docker/docker-entrypoint.sh /usr/bin/docker-entrypoi EXPOSE 9081 20498 ENV MAINTAINER="emqx.io" -ENV KUIPER_HOME /kuiper -ENV KUIPER__BASIC__CONSOLELOG true +ENV KUIPER_HOME="/kuiper" +ENV KUIPER__BASIC__CONSOLELOG=true WORKDIR ${KUIPER_HOME} VOLUME ["${KUIPER_HOME}/etc", "${KUIPER_HOME}/data", "${KUIPER_HOME}/plugins", "${KUIPER_HOME}/log"] diff --git a/deploy/docker/Dockerfile-full b/deploy/docker/Dockerfile-full index 05abeff146..b0c9cd784c 100644 --- a/deploy/docker/Dockerfile-full +++ b/deploy/docker/Dockerfile-full @@ -36,8 +36,8 @@ RUN apt-get update \ WORKDIR /kuiper ENV MAINTAINER="emqx.io" -ENV KUIPER_HOME /kuiper -ENV KUIPER__BASIC__CONSOLELOG true +ENV KUIPER_HOME="/kuiper" +ENV KUIPER__BASIC__CONSOLELOG=true VOLUME ["/kuiper/etc", "/kuiper/data", "/kuiper/plugins", "/kuiper/log"] EXPOSE 9081 20498 diff --git a/deploy/docker/Dockerfile-slim b/deploy/docker/Dockerfile-slim index 14d85cbb8e..f2586b4308 100644 --- a/deploy/docker/Dockerfile-slim +++ b/deploy/docker/Dockerfile-slim @@ -36,8 +36,8 @@ RUN apt-get update \ WORKDIR /kuiper ENV MAINTAINER="emqx.io" -ENV KUIPER_HOME /kuiper -ENV KUIPER__BASIC__CONSOLELOG true +ENV KUIPER_HOME="/kuiper" +ENV KUIPER__BASIC__CONSOLELOG=true VOLUME ["/kuiper/etc", "/kuiper/data", "/kuiper/plugins", "/kuiper/log"] EXPOSE 9081 20498 diff --git a/deploy/docker/Dockerfile-slim-python b/deploy/docker/Dockerfile-slim-python index dee656c67f..7bb901dd30 100644 --- a/deploy/docker/Dockerfile-slim-python +++ b/deploy/docker/Dockerfile-slim-python @@ -40,8 +40,8 @@ RUN python3 setup.py sdist && python3 setup.py install WORKDIR /kuiper ENV MAINTAINER="emqx.io" -ENV KUIPER_HOME /kuiper -ENV KUIPER__BASIC__CONSOLELOG true +ENV KUIPER_HOME="/kuiper" +ENV KUIPER__BASIC__CONSOLELOG=true VOLUME ["/kuiper/etc", "/kuiper/data", "/kuiper/plugins", "/kuiper/log"] EXPOSE 9081 20498