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/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, 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)" 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