From 28535f27eddee8c539fe93eda56491328cd39e33 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Sat, 2 Jul 2022 10:12:46 +0200 Subject: [PATCH 1/5] ci: no special handing for windows package name windows packages for 5.0.0 and 5.0.1 were release using long package name (with otp version). but we have manually made a copy of the package to default (short) name and uploaded to s3. going forward, windows packages will only release on default (short) names because we never support relup for windows --- scripts/relup-build/download-base-packages.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/relup-build/download-base-packages.sh b/scripts/relup-build/download-base-packages.sh index 39c633395..8e03a4371 100755 --- a/scripts/relup-build/download-base-packages.sh +++ b/scripts/relup-build/download-base-packages.sh @@ -27,9 +27,13 @@ case $PROFILE in ;; esac -UNAME="$(uname -s)" -case "$UNAME" in - Darwin) +SYSTEM="$(./scripts/get-distro.sh)" +case "$SYSTEM" in + windows*) + echo "NOTE: no_relup_for_windows" + exit 0 + ;; + macos*) SHASUM="shasum -a 256" ;; *) From 2cfdaf751e707d1e83364dc514ce4bd491f2a26b Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Sat, 2 Jul 2022 10:15:19 +0200 Subject: [PATCH 2/5] chore: explicitly disable base image downloading for windows we can technically support relup for windows but currently there is no such requirement made from any users, not opensource users, not commercial users either. --- pkg-vsn.sh | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/pkg-vsn.sh b/pkg-vsn.sh index 20eead6f7..26bd2a5f0 100755 --- a/pkg-vsn.sh +++ b/pkg-vsn.sh @@ -120,19 +120,15 @@ fi OTP_VSN="${OTP_VSN:-$(./scripts/get-otp-vsn.sh)}" SYSTEM="$(./scripts/get-distro.sh)" -if [ "${PKG_VSN:-}" = 'v5.0.0' ]; then - # 5.0.0 is released only with a full name package - # e.g. 5.0.0-otp24.2.1-1-ubuntu20.04-amd64 - case "$SYSTEM" in - windows*) - ## alway directly build the default package for windows - IS_DEFAULT_RELEASE='yes' - ;; - *) - true - ;; - esac -fi +case "$SYSTEM" in + windows*) + # directly build the default package for windows + IS_DEFAULT_RELEASE='yes' + ;; + *) + true + ;; +esac UNAME="$(uname -m)" case "$UNAME" in From c602ef708faca48d727aec3da6b5943891a0b555 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Sat, 2 Jul 2022 10:27:31 +0200 Subject: [PATCH 3/5] chore: bump version to 5.0.2 --- apps/emqx/include/emqx_release.hrl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/emqx/include/emqx_release.hrl b/apps/emqx/include/emqx_release.hrl index cda5095b6..62aaf71c3 100644 --- a/apps/emqx/include/emqx_release.hrl +++ b/apps/emqx/include/emqx_release.hrl @@ -32,7 +32,7 @@ %% `apps/emqx/src/bpapi/README.md' %% Community edition --define(EMQX_RELEASE_CE, "5.0.1"). +-define(EMQX_RELEASE_CE, "5.0.2"). %% Enterprise edition -define(EMQX_RELEASE_EE, "5.0.0-alpha.1"). From 999eac5376e3d3464abf0af851e5e4f9da2cafb7 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Sat, 2 Jul 2022 11:37:14 +0200 Subject: [PATCH 4/5] chore: bump emqx app version to 5.0.2 --- apps/emqx/src/emqx.app.src | 2 +- scripts/apps-version-check.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/emqx/src/emqx.app.src b/apps/emqx/src/emqx.app.src index d86608b25..f466ce5cc 100644 --- a/apps/emqx/src/emqx.app.src +++ b/apps/emqx/src/emqx.app.src @@ -3,7 +3,7 @@ {id, "emqx"}, {description, "EMQX Core"}, % strict semver, bump manually! - {vsn, "5.0.1"}, + {vsn, "5.0.2"}, {modules, []}, {registered, []}, {applications, [ diff --git a/scripts/apps-version-check.sh b/scripts/apps-version-check.sh index 44731c4aa..72ddd5dc3 100755 --- a/scripts/apps-version-check.sh +++ b/scripts/apps-version-check.sh @@ -24,6 +24,7 @@ while read -r app; do if [ "$old_app_version" = "$now_app_version" ]; then changed_lines="$(git diff "$latest_release"...HEAD --ignore-blank-lines -G "$no_comment_re" \ -- "$app_path/src" \ + -- "$app_path/include" \ -- ":(exclude)"$app_path/src/*.appup.src"" \ -- "$app_path/priv" \ -- "$app_path/c_src" | wc -l ) " From 14aa134ed00e41e695e8f64c6f0a70a5272dc18f Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Sat, 2 Jul 2022 10:36:55 +0200 Subject: [PATCH 5/5] ci: no need to download upgrade base packages for opensource edition --- .github/workflows/run_relup_tests.yaml | 10 +---- CHANGES-5.0.md | 39 +++++++++++++++++++ pkg-vsn.sh | 4 +- scripts/relup-build/download-base-packages.sh | 10 ++--- 4 files changed, 47 insertions(+), 16 deletions(-) diff --git a/.github/workflows/run_relup_tests.yaml b/.github/workflows/run_relup_tests.yaml index 59e97d679..ee21538fd 100644 --- a/.github/workflows/run_relup_tests.yaml +++ b/.github/workflows/run_relup_tests.yaml @@ -18,7 +18,6 @@ jobs: runs-on: ubuntu-20.04 container: "ghcr.io/emqx/emqx-builder/5.0-17:1.13.4-24.2.1-1-ubuntu20.04" outputs: - CUR_CE_VSN: ${{ steps.find-versions.outputs.CUR_CE_VSN }} CUR_EE_VSN: ${{ steps.find-versions.outputs.CUR_EE_VSN }} OLD_VERSIONS: ${{ steps.find-versions.outputs.OLD_VERSIONS }} defaults: @@ -35,12 +34,9 @@ jobs: run: | set -x cd emqx - ce_vsn="$(./pkg-vsn.sh opensource)" ee_vsn="$(./pkg-vsn.sh enterprise)" - old_ce_vsns="$(./scripts/relup-build/base-vsns.sh opensource | xargs)" old_ee_vsns="$(./scripts/relup-build/base-vsns.sh enterprise | xargs)" - old_vsns=$(echo -n "${old_ce_vsns} ${old_ee_vsns}" | sed 's/ $//g' | jq -R -s -c 'split(" ")') - echo "::set-output name=CUR_CE_VSN::$ce_vsn" + old_vsns=$(echo -n "${old_ee_vsns}" | sed 's/ $//g' | jq -R -s -c 'split(" ")') echo "::set-output name=CUR_EE_VSN::$ee_vsn" echo "::set-output name=OLD_VERSIONS::$old_vsns" - name: build emqx @@ -69,7 +65,6 @@ jobs: old_vsn: ${{ fromJson(needs.relup_test_plan.outputs.OLD_VERSIONS) }} env: OLD_VSN: "${{ matrix.old_vsn }}" - CUR_CE_VSN: "${{ needs.relup_test_plan.outputs.CUR_CE_VSN }}" CUR_EE_VSN: "${{ needs.relup_test_plan.outputs.CUR_EE_VSN }}" defaults: run: @@ -107,9 +102,6 @@ jobs: e*) export CUR_VSN="$CUR_EE_VSN" ;; - v*) - export CUR_VSN="$CUR_CE_VSN" - ;; *) echo "unknown old version $OLD_VSN" exit 1 diff --git a/CHANGES-5.0.md b/CHANGES-5.0.md index 4f713ac2d..2665503e7 100644 --- a/CHANGES-5.0.md +++ b/CHANGES-5.0.md @@ -1,5 +1,44 @@ +# 5.0.2 + +Announcemnet: EMQX team has decided to stop supporting relup for opensouce edition. +Going forward, it will be an enterprise only feature. + +Main reason: relup requires carefully crafted upgrade instructions from ALL previous versions. + +For example, 4.3 is now at 4.3.16, we have `4.3.0->4.3.16`, `4.3.1->4.3.16`, ... 16 such upgrade paths in total to maintain. +This had been the biggest obstacle for EMQX team to act agile enought in deliverying enhancements and fixes. + +## Enhancements + +## Bug fixes + +* Fixed a typo in `bin/emqx` which affects MacOs release when trying to enable Erlang distribution over TLS [8398](https://github.com/emqx/emqx/pull/8398) + # 5.0.1 +5.0.1 is built on [Erlang/OTP 24.2.1-1](https://github.com/emqx/otp/tree/OTP-24.2.1-1). Same as 5.0.0. + +5.0.0 (like 4.4.x) had Erlang/OTP version number in the package name. +This is because we wanted to release different flavor packages (on different Elixir/Erlang/OTP platforms). + +However the long package names also causes confusion, as users may not know which to choose if there were more than +one presented at the same time. + +Going forward, (starting from 5.0.1), packages will be released in both default (short) and flavored (long) package names. + +For example: `emqx-5.0.1-otp24.2.1-1-ubuntu20.04-amd64.tar.gz`, +but only the default one is presented to the users: `emqx-5.0.1-ubuntu20.04-amd64.tar.gz`. + +In case anyone wants to try a different flavor package, it can be downlowded from the public s3 bucket, +for example: +https://s3.us-west-2.amazonaws.com/packages.emqx/emqx-ce/v5.0.1/emqx-5.0.1-otp24.2.1-1-ubuntu20.04-arm64.tar.gz + +Exceptions: + +* Windows package is always presented with short name (currently on Erlang/OTP 24.2.1). +* Elixir package name is flavored with both Elixir and Erlang/OTP version numbers, + for example: `emqx-5.0.1-elixir1.13.4-otp24.2.1-1-ubuntu20.04-amd64.tar.gz` + ## Enhancements * Removed management API auth for prometheus scraping endpoint /api/v5/prometheus/stats [8299](https://github.com/emqx/emqx/pull/8299) diff --git a/pkg-vsn.sh b/pkg-vsn.sh index 26bd2a5f0..7e5c44d27 100755 --- a/pkg-vsn.sh +++ b/pkg-vsn.sh @@ -130,8 +130,8 @@ case "$SYSTEM" in ;; esac -UNAME="$(uname -m)" -case "$UNAME" in +UNAME_M="$(uname -m)" +case "$UNAME_M" in x86_64) ARCH='amd64' ;; diff --git a/scripts/relup-build/download-base-packages.sh b/scripts/relup-build/download-base-packages.sh index 8e03a4371..6d4095edb 100755 --- a/scripts/relup-build/download-base-packages.sh +++ b/scripts/relup-build/download-base-packages.sh @@ -9,18 +9,18 @@ set -euo pipefail cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")/../.." ROOT_DIR="$(pwd)" -PROFILE="${1:-emqx}" +PROFILE="${1:-emqx-enterprise}" export PROFILE case $PROFILE in - "emqx") - DIR='broker' - EDITION='opensource' - ;; "emqx-enterprise") DIR='enterprise' EDITION='enterprise' ;; + "emqx") + echo "No relup for opensource edition" + exit 0 + ;; *) echo "Unknown profile $PROFILE" exit 1