From 411fcaa78fcf75392dd235533ba9b8d351971b08 Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Thu, 6 Nov 2025 10:23:47 +0530 Subject: [PATCH] mgr/dashboard: start node virtual-env after starting ceph cluster in frontend e2e.sh file, we don't need to start the node venv early on before the ceph cluster is started. we only need it for the `npm` or `npx` commands. Starting node virtual env and then starting ceph will cause the ceph cluster to assume the node-env python as the python environment which breaks the cryptotools call. So moving the node-env venv start after the ceph is created Fixes: https://tracker.ceph.com/issues/73804 Signed-off-by: Nizamudeen A (cherry picked from commit a56ae5b0e6d1ed035fbb93591fea7e27858004e5) --- .../mgr/dashboard/run-frontend-e2e-tests.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/pybind/mgr/dashboard/run-frontend-e2e-tests.sh b/src/pybind/mgr/dashboard/run-frontend-e2e-tests.sh index 8c4c1735596..b174f21b3e4 100755 --- a/src/pybind/mgr/dashboard/run-frontend-e2e-tests.sh +++ b/src/pybind/mgr/dashboard/run-frontend-e2e-tests.sh @@ -79,9 +79,6 @@ check_device_available() { if [ "$DEVICE" == "docker" ]; then [ -x "$(command -v docker)" ] || failed=true else - cd $DASH_DIR/frontend - npx cypress verify - case "$DEVICE" in chrome) [ -x "$(command -v chrome)" ] || [ -x "$(command -v google-chrome)" ] || @@ -124,19 +121,22 @@ DASH_DIR=`pwd` cd ../../../../${BUILD_DIR} FULL_PATH_BUILD_DIR=`pwd` -[[ "$(command -v npm)" == '' ]] && . ${FULL_PATH_BUILD_DIR}/src/pybind/mgr/dashboard/frontend/node-env/bin/activate - -: ${CYPRESS_CACHE_FOLDER:="${FULL_PATH_BUILD_DIR}/src/pybind/mgr/dashboard/cypress"} - -export CYPRESS_BASE_URL CYPRESS_CACHE_FOLDER CYPRESS_LOGIN_USER CYPRESS_LOGIN_PWD NO_COLOR CYPRESS_CEPH2_URL - check_device_available if [ "$CYPRESS_BASE_URL" == "" ]; then start_ceph fi +# node-env is used for all frontend related actions like npm, npx etc. +[[ "$(command -v npm)" == '' ]] && . ${FULL_PATH_BUILD_DIR}/src/pybind/mgr/dashboard/frontend/node-env/bin/activate + +: ${CYPRESS_CACHE_FOLDER:="${FULL_PATH_BUILD_DIR}/src/pybind/mgr/dashboard/cypress"} + +export CYPRESS_BASE_URL CYPRESS_CACHE_FOLDER CYPRESS_LOGIN_USER CYPRESS_LOGIN_PWD NO_COLOR CYPRESS_CEPH2_URL + +# Verify Cypress installation cd $DASH_DIR/frontend +npx cypress verify # Remove existing XML results rm -f cypress/reports/results-*.xml || true -- 2.47.3