Просмотр исходного кода

chore: prepare for 5.7.0-rc.2 release

zmstone 1 год назад
Родитель
Сommit
0763e29786

+ 6 - 5
.github/actions/package-macos/action.yaml

@@ -33,7 +33,7 @@ runs:
         HOMEBREW_NO_INSTALL_UPGRADE: 1
         HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
       run: |
-        brew install curl zip unzip coreutils openssl@1.1
+        brew install curl zip unzip coreutils openssl@1.1 unixodbc
         echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH
         echo "/usr/local/bin" >> $GITHUB_PATH
         echo "emqx_name=${emqx_name}" >> $GITHUB_OUTPUT
@@ -56,7 +56,7 @@ runs:
       if: steps.prepare.outputs.SELF_HOSTED != 'true'
       with:
         path: ${{ steps.prepare.outputs.OTP_INSTALL_PATH }}
-        key: otp-install-${{ inputs.otp }}-${{ inputs.os }}-static-ssl-disable-hipe-disable-jit
+        key: otp-install-${{ inputs.otp }}-${{ inputs.os }}-static-ssl-disable-hipe-disable-jit-20240524-1
     - name: build erlang
       if: steps.cache.outputs.cache-hit != 'true'
       shell: bash
@@ -80,9 +80,10 @@ runs:
         git clone --depth 1 --branch OTP-${{ inputs.otp }} https://github.com/emqx/otp.git "$OTP_SOURCE_PATH"
         cd "$OTP_SOURCE_PATH"
         if [ "$(arch)" = arm64 ]; then
-            export CFLAGS="-O2 -g -I$(brew --prefix unixodbc)/include"
-            export LDFLAGS="-L$(brew --prefix unixodbc)/lib"
-            WITH_ODBC="--with-odbc=$(brew --prefix unixodbc)"
+            ODBCHOME="$(brew --prefix unixodbc)"
+            export CFLAGS="-O2 -g -I${ODBCHOME}/include"
+            export LDFLAGS="-L${ODBCHOME}/lib"
+            WITH_ODBC="--with-odbc=${ODBCHOME}"
         else
             WITH_ODBC=""
         fi

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

@@ -156,7 +156,7 @@ jobs:
           password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
           ecr: true
 
-      - name: Build docker image
+      - name: Build docker image for smoke test
         env:
           PROFILE: ${{ matrix.profile[0] }}
           DOCKER_REGISTRY: ${{ matrix.profile[1] }}
@@ -164,7 +164,6 @@ jobs:
           DOCKER_LATEST: ${{ inputs.latest }}
           DOCKER_PUSH: false
           DOCKER_BUILD_NOCACHE: true
-          DOCKER_PLATFORMS: linux/amd64,linux/arm64
           DOCKER_LOAD: true
           EMQX_RUNNER: 'public.ecr.aws/debian/debian:12-slim'
           EMQX_DOCKERFILE: 'deploy/docker/Dockerfile'
@@ -203,7 +202,8 @@ jobs:
           docker exec -t -u root -w /root $CID bash -c 'apt-get -y update && apt-get -y install net-tools'
           docker exec -t -u root $CID node_dump
           docker rm -f $CID
-      - name: Push docker image
+
+      - name: Build and push docker image
         if: inputs.publish || github.repository_owner != 'emqx'
         env:
           PROFILE: ${{ matrix.profile[0] }}

+ 0 - 3
.github/workflows/run_docker_tests.yaml

@@ -47,9 +47,6 @@ jobs:
           echo "_EMQX_DOCKER_IMAGE_TAG=$_EMQX_DOCKER_IMAGE_TAG" >> $GITHUB_ENV
       - name: dashboard tests
         working-directory: ./scripts/ui-tests
-        env:
-          EMQX_VERSION: ${{ inputs.version-emqx }}
-          EMQX_ENTERPRISE_VERSION: ${{ inputs.version-emqx-enterprise }}
         run: |
           set -eu
           docker compose up --abort-on-container-exit --exit-code-from selenium

+ 2 - 2
apps/emqx/include/emqx_release.hrl

@@ -32,7 +32,7 @@
 %% `apps/emqx/src/bpapi/README.md'
 
 %% Opensource edition
--define(EMQX_RELEASE_CE, "5.7.0-rc.1").
+-define(EMQX_RELEASE_CE, "5.7.0-rc.2").
 
 %% Enterprise edition
--define(EMQX_RELEASE_EE, "5.7.0-rc.1").
+-define(EMQX_RELEASE_EE, "5.7.0-rc.2").

+ 2 - 2
deploy/charts/emqx-enterprise/Chart.yaml

@@ -14,8 +14,8 @@ type: application
 
 # This is the chart version. This version number should be incremented each time you make changes
 # to the chart and its templates, including the app version.
-version: 5.7.0-rc.1
+version: 5.7.0-rc.2
 
 # This is the version number of the application being deployed. This version number should be
 # incremented each time you make changes to the application.
-appVersion: 5.7.0-rc.1
+appVersion: 5.7.0-rc.2

+ 2 - 2
deploy/charts/emqx/Chart.yaml

@@ -14,8 +14,8 @@ type: application
 
 # This is the chart version. This version number should be incremented each time you make changes
 # to the chart and its templates, including the app version.
-version: 5.7.0-rc.1
+version: 5.7.0-rc.2
 
 # This is the version number of the application being deployed. This version number should be
 # incremented each time you make changes to the application.
-appVersion: 5.7.0-rc.1
+appVersion: 5.7.0-rc.2

+ 24 - 8
scripts/ui-tests/dashboard_test.py

@@ -2,6 +2,7 @@ import os
 import time
 import unittest
 import pytest
+import requests
 from urllib.parse import urljoin
 from selenium import webdriver
 from selenium.webdriver.common.by import By
@@ -77,6 +78,23 @@ def test_log(driver, login, dashboard_url):
     label = driver.find_element(By.XPATH, "//div[@id='app']//form//label[contains(., 'Time Offset')]")
     assert driver.find_elements(By.ID, label.get_attribute("for"))
 
+def fetch_version_info(dashboard_url):
+    status_url = urljoin(dashboard_url, "/status?format=json")
+    response = requests.get(status_url)
+    response.raise_for_status()
+    return response.json()
+
+def parse_version(version_str):
+    prefix_major, minor, _ = version_str.split('.', 2)
+    prefix = prefix_major[:1]
+    major = prefix_major[1:]
+    return prefix, major + '.' + minor
+
+def fetch_version(url):
+    info = fetch_version_info(url)
+    version_str = info['rel_vsn']
+    return parse_version(version_str)
+
 def test_docs_link(driver, login, dashboard_url):
     dest_url = urljoin(dashboard_url, "/#/dashboard/overview")
     driver.get(dest_url)
@@ -85,21 +103,19 @@ def test_docs_link(driver, login, dashboard_url):
     link_help = driver.find_element(By.XPATH, xpath_link_help)
     driver.execute_script("arguments[0].click();", link_help)
 
-    emqx_name = os.getenv("EMQX_NAME")
-    emqx_community_version = os.getenv("EMQX_COMMUNITY_VERSION")
-    emqx_enterprise_version = os.getenv("EMQX_ENTERPRISE_VERSION")
-    if emqx_name == 'emqx-enterprise':
-        emqx_version = f"v{emqx_enterprise_version}"
+    prefix, emqx_version = fetch_version(dashboard_url)
+    # it's v5.x in the url
+    emqx_version = 'v' + emqx_version
+
+    if prefix == 'e':
         docs_base_url = "https://docs.emqx.com/en/enterprise"
     else:
-        emqx_version = f"v{emqx_community_version}"
         docs_base_url = "https://www.emqx.io/docs/en"
 
-    emqx_version = ".".join(emqx_version.split(".")[:2])
     docs_url = f"{docs_base_url}/{emqx_version}"
     xpath = f"//div[@id='app']//div[@class='nav-header']//a[@href[starts-with(.,'{docs_url}')]]"
 
     try:
         driver.find_element(By.XPATH, xpath)
     except NoSuchElementException:
-        raise AssertionError(f"Cannot find the doc URL for {emqx_name} version {emqx_version}, please make sure the dashboard package is up to date.")
+        raise AssertionError(f"Cannot find the doc URL for version {emqx_version}, please make sure the dashboard package is up to date.")

+ 0 - 4
scripts/ui-tests/docker-compose.yaml

@@ -9,10 +9,6 @@ services:
   selenium:
     shm_size: '2gb'
     image: ghcr.io/emqx/selenium-chrome:latest
-    environment:
-      EMQX_NAME: ${EMQX_NAME}
-      EMQX_COMMUNITY_VERSION: ${EMQX_VERSION}
-      EMQX_ENTERPRISE_VERSION: ${EMQX_ENTERPRISE_VERSION}
     volumes:
       - ./:/app
     depends_on: