]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: start node virtual-env after starting ceph cluster
authorNizamudeen A <nia@redhat.com>
Thu, 6 Nov 2025 04:53:47 +0000 (10:23 +0530)
committerNizamudeen A <nia@redhat.com>
Wed, 12 Nov 2025 09:31:01 +0000 (15:01 +0530)
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 <nia@redhat.com>
src/pybind/mgr/dashboard/run-frontend-e2e-tests.sh

index 8c4c17355968a06de9a172e3bdcf385093e2e79d..b174f21b3e4d39d0acbf47a491b8fde56115d008 100755 (executable)
@@ -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