瀏覽代碼

Merge pull request #10929 from zmstone/0602-ci-pin-otp-25.3.2-1-elixir-1.14.5

ci: upgrade to otp 25.3.2-1 and elixir 1.14.5
Zaiming (Stone) Shi 2 年之前
父節點
當前提交
0b87ea4cdc

+ 1 - 1
.ci/docker-compose-file/docker-compose-kafka.yaml

@@ -18,7 +18,7 @@ services:
       - /tmp/emqx-ci/emqx-shared-secret:/var/lib/secret
   kdc:
     hostname: kdc.emqx.net
-    image:  ghcr.io/emqx/emqx-builder/5.0-33:1.13.4-24.3.4.2-3-ubuntu20.04
+    image:  ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-ubuntu20.04
     container_name: kdc.emqx.net
     expose:
       - 88 # kdc

+ 1 - 1
.ci/docker-compose-file/docker-compose.yaml

@@ -3,7 +3,7 @@ version: '3.9'
 services:
   erlang:
     container_name: erlang
-    image: ${DOCKER_CT_RUNNER_IMAGE:-ghcr.io/emqx/emqx-builder/5.0-33:1.13.4-24.3.4.2-3-ubuntu20.04}
+    image: ${DOCKER_CT_RUNNER_IMAGE:-ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-ubuntu20.04}
     env_file:
       - conf.env
     environment:

+ 1 - 1
.github/actions/package-macos/action.yaml

@@ -3,7 +3,7 @@ inputs:
   profile: # emqx, emqx-enterprise
     required: true
     type: string
-  otp: # 25.1.2-2, 24.3.4.2-2
+  otp: # 25.3.2-1
     required: true
     type: string
   os:

+ 4 - 4
.github/workflows/build_and_push_docker_images.yaml

@@ -25,7 +25,7 @@ jobs:
   prepare:
     runs-on: ubuntu-22.04
     # prepare source with any OTP version, no need for a matrix
-    container: "ghcr.io/emqx/emqx-builder/5.0-35:1.13.4-24.3.4.2-3-ubuntu22.04"
+    container: "ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-ubuntu22.04"
 
     outputs:
       PROFILE: ${{ steps.get_profile.outputs.PROFILE }}
@@ -120,12 +120,12 @@ jobs:
         # NOTE: 'otp' and 'elixir' are to configure emqx-builder image
         #       only support latest otp and elixir, not a matrix
         builder:
-          - 5.0-35 # update to latest
+          - 5.1-0 # update to latest
         otp:
-          - 24.3.4.2-3 # switch to 25 once ready to release 5.1
+          - 25.3.2-1
         elixir:
           - 'no_elixir'
-          - '1.13.4' # update to latest
+          - '1.14.5' # update to latest
         exclude: # TODO: publish enterprise to ecr too?
           - registry: 'public.ecr.aws'
             profile: emqx-enterprise

+ 12 - 12
.github/workflows/build_packages.yaml

@@ -21,7 +21,7 @@ on:
 jobs:
   prepare:
     runs-on: ubuntu-22.04
-    container: ghcr.io/emqx/emqx-builder/5.0-35:1.13.4-24.3.4.2-3-ubuntu22.04
+    container: ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-ubuntu22.04
     outputs:
       BUILD_PROFILE: ${{ steps.get_profile.outputs.BUILD_PROFILE }}
       IS_EXACT_TAG: ${{ steps.get_profile.outputs.IS_EXACT_TAG }}
@@ -90,7 +90,7 @@ jobs:
     - uses: ilammy/msvc-dev-cmd@v1.12.0
     - uses: erlef/setup-beam@v1.15.2
       with:
-        otp-version: 24.3.4.6
+        otp-version: 25.3.2
     - name: build
       env:
         PYTHON: python
@@ -132,7 +132,7 @@ jobs:
         profile:
           - ${{ needs.prepare.outputs.BUILD_PROFILE }}
         otp:
-          - 24.3.4.2-3
+          - 25.3.2-1
         os:
           - macos-11
           - macos-12
@@ -173,7 +173,7 @@ jobs:
         profile:
           - ${{ needs.prepare.outputs.BUILD_PROFILE }}
         otp:
-          - 24.3.4.2-3
+          - 25.3.2-1
         arch:
           - amd64
           - arm64
@@ -191,9 +191,9 @@ jobs:
           - aws-arm64
           - ubuntu-22.04
         builder:
-          - 5.0-35
+          - 5.1-0
         elixir:
-          - 1.13.4
+          - 1.14.5
         exclude:
         - arch: arm64
           build_machine: ubuntu-22.04
@@ -201,20 +201,20 @@ jobs:
           build_machine: aws-arm64
         include:
           - profile: emqx
-            otp: 25.1.2-3
+            otp: 25.3.2-1
             arch: amd64
             os: ubuntu22.04
             build_machine: ubuntu-22.04
-            builder: 5.0-35
-            elixir: 1.13.4
+            builder: 5.1-0
+            elixir: 1.14.5
             release_with: elixir
           - profile: emqx
-            otp: 25.1.2-3
+            otp: 25.3.2-1
             arch: amd64
             os: amzn2
             build_machine: ubuntu-22.04
-            builder: 5.0-35
-            elixir: 1.13.4
+            builder: 5.1-0
+            elixir: 1.14.5
             release_with: elixir
 
     defaults:

+ 4 - 4
.github/workflows/build_packages_cron.yaml

@@ -25,16 +25,16 @@ jobs:
           - ['emqx', 'master']
           - ['emqx-enterprise', 'release-51']
         otp:
-          - 24.3.4.2-3
+          - 25.3.2-1
         arch:
           - amd64
         os:
           - debian10
           - amzn2
         builder:
-          - 5.0-35
+          - 5.1-0
         elixir:
-          - 1.13.4
+          - 1.14.5
 
     defaults:
       run:
@@ -92,7 +92,7 @@ jobs:
         branch:
           - master
         otp:
-          - 24.3.4.2-3
+          - 25.3.2-1
         os:
           - macos-12
           - macos-12-arm64

+ 8 - 8
.github/workflows/build_slim_packages.yaml

@@ -30,14 +30,14 @@ jobs:
       fail-fast: false
       matrix:
         profile:
-          - ["emqx", "24.3.4.2-3", "el7", "erlang"]
-          - ["emqx", "25.1.2-3", "ubuntu22.04", "elixir"]
-          - ["emqx-enterprise", "24.3.4.2-3", "amzn2", "erlang"]
-          - ["emqx-enterprise", "25.1.2-3", "ubuntu20.04", "erlang"]
+          - ["emqx", "25.3.2-1", "el7", "erlang"]
+          - ["emqx", "25.3.2-1", "ubuntu22.04", "elixir"]
+          - ["emqx-enterprise", "25.3.2-1", "amzn2", "erlang"]
+          - ["emqx-enterprise", "25.3.2-1", "ubuntu20.04", "erlang"]
         builder:
-          - 5.0-35
+          - 5.1-0
         elixir:
-          - '1.13.4'
+          - '1.14.5'
 
     container: "ghcr.io/emqx/emqx-builder/${{ matrix.builder }}:${{ matrix.elixir }}-${{ matrix.profile[1] }}-${{ matrix.profile[2] }}"
 
@@ -92,7 +92,7 @@ jobs:
         profile:
           - emqx
         otp:
-          - 25.1.2
+          - 25.3.2
     steps:
     - uses: actions/checkout@v3
     - uses: ilammy/msvc-dev-cmd@v1.12.0
@@ -138,7 +138,7 @@ jobs:
         - emqx
         - emqx-enterprise
         otp:
-        - 24.3.4.2-3
+        - 25.3.2-1
         os:
         - macos-11
         - macos-12-arm64

+ 1 - 1
.github/workflows/check_deps_integrity.yaml

@@ -6,7 +6,7 @@ on:
 jobs:
   check_deps_integrity:
     runs-on: ubuntu-22.04
-    container: ghcr.io/emqx/emqx-builder/5.0-35:1.13.4-25.1.2-3-ubuntu22.04
+    container: ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-ubuntu22.04
 
     steps:
       - uses: actions/checkout@v3

+ 1 - 1
.github/workflows/code_style_check.yaml

@@ -5,7 +5,7 @@ on: [pull_request]
 jobs:
   code_style_check:
     runs-on: ubuntu-22.04
-    container: "ghcr.io/emqx/emqx-builder/5.0-35:1.13.4-25.1.2-3-ubuntu22.04"
+    container: "ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-ubuntu22.04"
     steps:
       - uses: actions/checkout@v3
         with:

+ 1 - 1
.github/workflows/elixir_apps_check.yaml

@@ -9,7 +9,7 @@ jobs:
   elixir_apps_check:
     runs-on: ubuntu-22.04
     # just use the latest builder
-    container: "ghcr.io/emqx/emqx-builder/5.0-35:1.13.4-25.1.2-3-ubuntu22.04"
+    container: "ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-ubuntu22.04"
 
     strategy:
       fail-fast: false

+ 1 - 1
.github/workflows/elixir_deps_check.yaml

@@ -8,7 +8,7 @@ on:
 jobs:
   elixir_deps_check:
     runs-on: ubuntu-22.04
-    container: ghcr.io/emqx/emqx-builder/5.0-35:1.13.4-25.1.2-3-ubuntu22.04
+    container: ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-ubuntu22.04
 
     steps:
       - name: Checkout

+ 1 - 1
.github/workflows/elixir_release.yml

@@ -17,7 +17,7 @@ jobs:
         profile:
           - emqx
           - emqx-enterprise
-    container: ghcr.io/emqx/emqx-builder/5.0-35:1.13.4-25.1.2-3-ubuntu22.04
+    container: ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-ubuntu22.04
     steps:
       - name: Checkout
         uses: actions/checkout@v3

+ 1 - 1
.github/workflows/performance_test.yaml

@@ -15,7 +15,7 @@ jobs:
   prepare:
     runs-on: ubuntu-latest
     if: github.repository_owner == 'emqx'
-    container: ghcr.io/emqx/emqx-builder/5.0-35:1.13.4-25.1.2-3-ubuntu20.04
+    container: ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-ubuntu20.04
     outputs:
       BENCH_ID: ${{ steps.prepare.outputs.BENCH_ID }}
       PACKAGE_FILE: ${{ steps.package_file.outputs.PACKAGE_FILE }}

+ 1 - 1
.github/workflows/run_conf_tests.yaml

@@ -26,7 +26,7 @@ jobs:
         profile:
           - emqx
           - emqx-enterprise
-    container: "ghcr.io/emqx/emqx-builder/5.0-34:1.13.4-25.1.2-3-ubuntu22.04"
+    container: "ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-ubuntu22.04"
     steps:
       - uses: AutoModality/action-clean@v1
       - uses: actions/checkout@v3

+ 3 - 3
.github/workflows/run_emqx_app_tests.yaml

@@ -12,14 +12,14 @@ jobs:
     strategy:
       matrix:
         builder:
-          - 5.0-35
+          - 5.1-0
         otp:
-          - 25.1.2-3
+          - 25.3.2-1
         # no need to use more than 1 version of Elixir, since tests
         # run using only Erlang code.  This is needed just to specify
         # the base image.
         elixir:
-          - 1.13.4
+          - 1.14.5
         os:
           - ubuntu22.04
         arch:

+ 9 - 9
.github/workflows/run_fvt_tests.yaml

@@ -17,7 +17,7 @@ jobs:
   prepare:
     runs-on: ubuntu-22.04
     # prepare source with any OTP version, no need for a matrix
-    container: ghcr.io/emqx/emqx-builder/5.0-35:1.13.4-24.3.4.2-3-debian11
+    container: ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-debian11
 
     steps:
       - uses: actions/checkout@v3
@@ -50,17 +50,17 @@ jobs:
         os:
           - ["debian11", "debian:11-slim"]
         builder:
-          - 5.0-35
+          - 5.1-0
         otp:
-          - 24.3.4.2-3
+          - 25.3.2-1
         elixir:
-          - 1.13.4
+          - 1.14.5
         arch:
           - amd64
     steps:
     - uses: erlef/setup-beam@v1.15.2
       with:
-        otp-version: 24.3.4.6
+        otp-version: 25.3.2
     - uses: actions/download-artifact@v3
       with:
         name: source
@@ -123,11 +123,11 @@ jobs:
         os:
         - ["debian11", "debian:11-slim"]
         builder:
-        - 5.0-35
+        - 5.1-0
         otp:
-        - 24.3.4.2-3
+        - 25.3.2-1
         elixir:
-        - 1.13.4
+        - 1.14.5
         arch:
         - amd64
       # - emqx-enterprise # TODO test enterprise
@@ -135,7 +135,7 @@ jobs:
     steps:
     - uses: erlef/setup-beam@v1.15.2
       with:
-        otp-version: 24.3.4.6
+        otp-version: 25.3.2
     - uses: actions/download-artifact@v3
       with:
         name: source

+ 6 - 6
.github/workflows/run_jmeter_tests.yaml

@@ -16,7 +16,7 @@ jobs:
     steps:
     - uses: erlef/setup-beam@v1.15.2
       with:
-        otp-version: 24.3.4.6
+        otp-version: 25.3.2
     - name: download jmeter
       timeout-minutes: 3
       env:
@@ -59,7 +59,7 @@ jobs:
     steps:
     - uses: erlef/setup-beam@v1.15.2
       with:
-        otp-version: 24.3.4.6
+        otp-version: 25.3.2
     - uses: actions/checkout@v3
     - uses: actions/download-artifact@v3
       with:
@@ -155,7 +155,7 @@ jobs:
     steps:
     - uses: erlef/setup-beam@v1.15.2
       with:
-        otp-version: 24.3.4.6
+        otp-version: 25.3.2
     - uses: actions/checkout@v3
     - uses: actions/download-artifact@v3
       with:
@@ -261,7 +261,7 @@ jobs:
     steps:
     - uses: erlef/setup-beam@v1.15.2
       with:
-        otp-version: 24.3.4.6
+        otp-version: 25.3.2
     - uses: actions/checkout@v3
     - uses: actions/download-artifact@v3
       with:
@@ -363,7 +363,7 @@ jobs:
     steps:
     - uses: erlef/setup-beam@v1.15.2
       with:
-        otp-version: 24.3.4.6
+        otp-version: 25.3.2
     - uses: actions/checkout@v3
     - uses: actions/download-artifact@v3
       with:
@@ -462,7 +462,7 @@ jobs:
     steps:
     - uses: erlef/setup-beam@v1.15.2
       with:
-        otp-version: 24.3.4.6
+        otp-version: 25.3.2
     - uses: actions/checkout@v3
     - uses: actions/download-artifact@v3
       with:

+ 2 - 2
.github/workflows/run_relup_tests.yaml

@@ -15,7 +15,7 @@ concurrency:
 jobs:
   relup_test_plan:
     runs-on: ubuntu-22.04
-    container: "ghcr.io/emqx/emqx-builder/5.0-35:1.13.4-24.3.4.2-3-ubuntu22.04"
+    container: "ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-ubuntu22.04"
     outputs:
       CUR_EE_VSN: ${{ steps.find-versions.outputs.CUR_EE_VSN }}
       OLD_VERSIONS: ${{ steps.find-versions.outputs.OLD_VERSIONS }}
@@ -73,7 +73,7 @@ jobs:
       # setup Erlang to run lux
     - uses: erlef/setup-beam@v1.15.2
       with:
-        otp-version: 24.3.4.6
+        otp-version: 25.3.2
     - uses: actions/checkout@v3
       with:
         repository: hawk/lux

+ 8 - 8
.github/workflows/run_test_cases.yaml

@@ -34,14 +34,14 @@ jobs:
           MATRIX="$(echo "${APPS}" | jq -c '
             [
               (.[] | select(.profile == "emqx") | . + {
-                builder: "5.0-35",
-                otp: "25.1.2-3",
-                elixir: "1.13.4"
+                builder: "5.1-0",
+                otp: "25.3.2-1",
+                elixir: "1.14.5"
               }),
               (.[] | select(.profile == "emqx-enterprise") | . + {
-                builder: "5.0-35",
-                otp: ["24.3.4.2-3", "25.1.2-3"][],
-                elixir: "1.13.4"
+                builder: "5.1-0",
+                otp: ["25.3.2-1"][],
+                elixir: "1.14.5"
               })
             ]
           ')"
@@ -258,12 +258,12 @@ jobs:
       - ct
       - ct_docker
     runs-on: ubuntu-22.04
-    container: "ghcr.io/emqx/emqx-builder/5.0-35:1.13.4-24.3.4.2-3-ubuntu22.04"
+    container: "ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-ubuntu22.04"
     steps:
       - uses: AutoModality/action-clean@v1
       - uses: actions/download-artifact@v3
         with:
-          name: source-emqx-enterprise-24.3.4.2-3
+          name: source-emqx-enterprise-25.3.2-1
           path: .
       - name: unzip source code
         run: unzip -q source.zip

+ 2 - 2
.tool-versions

@@ -1,2 +1,2 @@
-erlang 24.3.4.2-3
-elixir 1.13.4-otp-24
+erlang 25.3.2-1
+elixir 1.14.5-otp-25

+ 1 - 1
Makefile

@@ -2,7 +2,7 @@ REBAR = $(CURDIR)/rebar3
 BUILD = $(CURDIR)/build
 SCRIPTS = $(CURDIR)/scripts
 export EMQX_RELUP ?= true
-export EMQX_DEFAULT_BUILDER = ghcr.io/emqx/emqx-builder/5.0-28:1.13.4-24.3.4.2-2-debian11
+export EMQX_DEFAULT_BUILDER = ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-debian11
 export EMQX_DEFAULT_RUNNER = debian:11-slim
 export EMQX_REL_FORM ?= tgz
 export QUICER_DOWNLOAD_FROM_RELEASE = 1

+ 1 - 1
apps/emqx_telemetry/src/emqx_telemetry.app.src

@@ -1,6 +1,6 @@
 {application, emqx_telemetry, [
     {description, "Report telemetry data for EMQX Opensource edition"},
-    {vsn, "0.1.0"},
+    {vsn, "0.1.1"},
     {registered, [emqx_telemetry_sup, emqx_telemetry]},
     {mod, {emqx_telemetry_app, []}},
     {applications, [

+ 3 - 2
apps/emqx_telemetry/src/emqx_telemetry.erl

@@ -365,7 +365,7 @@ report_telemetry(State0 = #state{url = URL}) ->
     {State, Data} = get_telemetry(State0),
     case emqx_utils_json:safe_encode(Data) of
         {ok, Bin} ->
-            httpc_request(post, URL, [], Bin),
+            ok = httpc_request(post, URL, [], Bin),
             ?tp(debug, telemetry_data_reported, #{});
         {error, Reason} ->
             %% debug? why?
@@ -376,7 +376,8 @@ report_telemetry(State0 = #state{url = URL}) ->
 httpc_request(Method, URL, Headers, Body) ->
     HTTPOptions = [{timeout, 10_000}, {ssl, [{verify, verify_none}]}],
     Options = [],
-    httpc:request(Method, {URL, Headers, "application/json", Body}, HTTPOptions, Options).
+    _ = httpc:request(Method, {URL, Headers, "application/json", Body}, HTTPOptions, Options),
+    ok.
 
 parse_os_release(FileContent) ->
     lists:foldl(

+ 1 - 0
changes/ce/feat-10929.en.md

@@ -0,0 +1 @@
+Upgrade Erlang/OTP to 25.3.2-1

+ 1 - 1
deploy/docker/Dockerfile

@@ -1,4 +1,4 @@
-ARG BUILD_FROM=ghcr.io/emqx/emqx-builder/5.0-33:1.13.4-24.3.4.2-3-debian11
+ARG BUILD_FROM=ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-debian11
 ARG RUN_FROM=debian:11-slim
 FROM ${BUILD_FROM} AS builder
 

+ 2 - 2
scripts/buildx.sh

@@ -9,7 +9,7 @@
 
 ## example:
 ## ./scripts/buildx.sh --profile emqx --pkgtype tgz --arch arm64 \
-##     --builder ghcr.io/emqx/emqx-builder/5.0-28:1.13.4-24.3.4.2-2-debian11
+##     --builder ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-debian11
 
 set -euo pipefail
 
@@ -24,7 +24,7 @@ help() {
     echo "--arch amd64|arm64:        Target arch to build the EMQX package for"
     echo "--src_dir <SRC_DIR>:       EMQX source code in this dir, default to PWD"
     echo "--builder <BUILDER>:       Builder image to pull"
-    echo "                           E.g. ghcr.io/emqx/emqx-builder/5.0-28:1.13.4-24.3.4.2-2-debian11"
+    echo "                           E.g. ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-debian11"
 }
 
 die() {

+ 2 - 2
scripts/relup-test/run-relup-lux.sh

@@ -45,8 +45,8 @@ fi
 # From now on, no need for the v|e prefix
 OLD_VSN="${old_vsn#[e|v]}"
 
-OLD_PKG="$(pwd)/_upgrade_base/${profile}-${OLD_VSN}-otp24.3.4.2-3-ubuntu20.04-amd64.tar.gz"
-CUR_PKG="$(pwd)/_packages/${profile}/${profile}-${cur_vsn}-otp24.3.4.2-3-ubuntu20.04-amd64.tar.gz"
+OLD_PKG="$(pwd)/_upgrade_base/${profile}-${OLD_VSN}-ubuntu20.04-amd64.tar.gz"
+CUR_PKG="$(pwd)/_packages/${profile}/${profile}-${cur_vsn}-ubuntu20.04-amd64.tar.gz"
 
 if [ ! -f "$OLD_PKG" ]; then
     echo "$OLD_PKG not found"

+ 1 - 1
scripts/relup-test/start-relup-test-cluster.sh

@@ -22,7 +22,7 @@ WEBHOOK="webhook.$NET"
 BENCH="bench.$NET"
 COOKIE='this-is-a-secret'
 ## Erlang image is needed to run webhook server and emqtt-bench
-ERLANG_IMAGE="ghcr.io/emqx/emqx-builder/5.0-33:1.13.4-24.3.4.2-3-ubuntu20.04"
+ERLANG_IMAGE="ghcr.io/emqx/emqx-builder/5.1-0:1.14.5-25.3.2-1-ubuntu20.04"
 # builder has emqtt-bench installed
 BENCH_IMAGE="$ERLANG_IMAGE"