From fa70ac119c057c2d42c69dbb0acdb00a8af49ad9 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Sun, 3 Dec 2023 09:55:13 +0100 Subject: [PATCH 1/3] fix(emqx_locker): fix spec --- src/ekka_locker.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ekka_locker.erl b/src/ekka_locker.erl index f0301015..8684315f 100644 --- a/src/ekka_locker.erl +++ b/src/ekka_locker.erl @@ -59,13 +59,13 @@ , code_change/3 ]). --type(resource() :: term()). +-type resource() :: term(). --type(lock_type() :: local | leader | quorum | all). +-type lock_type() :: local | leader | quorum | all. --type(lock_result() :: {boolean, [node() | {node(), any()}]}). +-type lock_result() :: {boolean(), [node() | {node(), any()}]}. --type(piggyback() :: mfa() | undefined). +-type piggyback() :: mfa() | undefined. -export_type([ resource/0 , lock_type/0 From 1a51cee525a47e80ba6b3a6bab73adca11c3eb5a Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Sun, 3 Dec 2023 09:56:48 +0100 Subject: [PATCH 2/3] ci: run tests on otp 26 and delete rocksdb build cache --- .github/workflows/run_test_case.yaml | 25 +------------------------ scripts/get-dep-refs.sh | 10 ---------- 2 files changed, 1 insertion(+), 34 deletions(-) delete mode 100755 scripts/get-dep-refs.sh diff --git a/.github/workflows/run_test_case.yaml b/.github/workflows/run_test_case.yaml index b5588fe8..45fb7fe2 100644 --- a/.github/workflows/run_test_case.yaml +++ b/.github/workflows/run_test_case.yaml @@ -6,19 +6,8 @@ jobs: run_test_case: runs-on: ubuntu-latest - strategy: - matrix: - os: - - ubuntu22.04 - otp: - - 25.3.2-2 - elixir: - - 1.14.5 - arch: - - amd64 - container: - image: ghcr.io/emqx/emqx-builder/5.1-4:${{ matrix.elixir }}-${{ matrix.otp }}-${{ matrix.os }} + image: ghcr.io/emqx/emqx-builder/5.2-7:1.15.7-26.1.2-1-ubuntu22.04 steps: - uses: actions/checkout@v2 @@ -28,18 +17,6 @@ jobs: apt update apt install -y cmake - - name: Get deps git refs for cache - id: deps-refs - run: | - scripts/get-dep-refs.sh - - - name: load rocksdb cache - uses: actions/cache@v2 - with: - path: | - _build/default/lib/rocksdb/ - key: ${{ matrix.os }}-${{ matrix.otp }}-${{ matrix.arch }}-${{ steps.deps-refs.outputs.DEP_ROCKSDB_REF }} - - name: Run tests run: | make eunit diff --git a/scripts/get-dep-refs.sh b/scripts/get-dep-refs.sh deleted file mode 100755 index a2de1732..00000000 --- a/scripts/get-dep-refs.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -get_ref() { - local APP=$1 - #echo "{ok,Raw}=file:consult(\"rebar.lock\"), {_Vsn, Deps}=hd(Raw), {_, {git, _Url, {ref, Ref}},_} = lists:keyfind(<<\"${APP}\">>,1, Deps), io:format(\"~s\",[Ref]), init:stop()." - erl -noshell -eval "{ok,Raw}=file:consult(\"rebar.lock\"), {_Vsn, Deps}=hd(Raw), {_, {git, _Url, {ref, Ref}},_} = lists:keyfind(<<\"${APP}\">>,1, Deps), io:format(\"~s\",[Ref]), init:stop()." -} - -rebar3 get-deps -echo "::set-output name=DEP_ROCKSDB_REF::$(get_ref rocksdb)" From 212a1d736f1099dd3aa41155b2359707122ca819 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Wed, 6 Dec 2023 10:19:55 +0100 Subject: [PATCH 3/3] chore: upgrade to mria 0.7.1 for otp 26 support --- rebar.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebar.config b/rebar.config index 0ad4fb67..2e0003ca 100644 --- a/rebar.config +++ b/rebar.config @@ -4,7 +4,7 @@ {deps, [{jiffy, {git, "https://github.com/emqx/jiffy", {tag, "1.0.5"}}}, {eetcd, {git, "https://github.com/zhongwencool/eetcd", {tag, "v0.3.4"}}}, {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe", {tag, "1.0.0"}}}, - {mria, {git, "https://github.com/emqx/mria", {tag, "0.7.0"}}} + {mria, {git, "https://github.com/emqx/mria", {tag, "0.7.1"}}} ]}. {erl_opts, [warn_unused_vars,