You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2024/09/26 00:04:23 UTC

(superset) branch debug_cypress created (now 8673f0e845)

This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a change to branch debug_cypress
in repository https://gitbox.apache.org/repos/asf/superset.git


      at 8673f0e845 chore: debug cypress memory issues

This branch includes the following new commits:

     new 8673f0e845 chore: debug cypress memory issues

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(superset) 01/01: chore: debug cypress memory issues

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

maximebeauchemin pushed a commit to branch debug_cypress
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 8673f0e8451bcf3f2b528db915843abcae122421
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Wed Sep 25 17:03:58 2024 -0700

    chore: debug cypress memory issues
---
 .github/workflows/bashlib.sh | 9 +++++++++
 scripts/cypress_run.py       | 2 ++
 2 files changed, 11 insertions(+)

diff --git a/.github/workflows/bashlib.sh b/.github/workflows/bashlib.sh
index 31e7d04b23..0d0f081ae6 100644
--- a/.github/workflows/bashlib.sh
+++ b/.github/workflows/bashlib.sh
@@ -162,6 +162,7 @@ cypress-run-all() {
     USE_DASHBOARD_FLAG='--use-dashboard'
   fi
 
+  monitor_memory &
   python ../../scripts/cypress_run.py --parallelism $PARALLELISM --parallelism-id $PARALLEL_ID $USE_DASHBOARD_FLAG
 
   # After job is done, print out Flask log for debugging
@@ -178,6 +179,14 @@ eyes-storybook-dependencies() {
   say "::endgroup::"
 }
 
+monitor_memory() {
+  while true; do
+    echo "$(date) - Top 5 memory-consuming processes:"
+    ps -eo pid,comm,%mem --sort=-%mem | head -n 6  # First line is the header, next 5 are top processes
+    sleep 10
+  done
+}
+
 cypress-run-applitools() {
   cd "$GITHUB_WORKSPACE/superset-frontend/cypress-base"
 
diff --git a/scripts/cypress_run.py b/scripts/cypress_run.py
index e2bb5bb698..059a5478ac 100644
--- a/scripts/cypress_run.py
+++ b/scripts/cypress_run.py
@@ -62,6 +62,7 @@ def get_cypress_cmd(
         spec: str = "cypress/e2e/*/**/*"
         cmd = (
             f"{XVFB_PRE_CMD} "
+            f"--reporter spec --reporter-options toConsole=true "
             f'{cypress_cmd} --spec "{spec}" --browser {browser} '
             f"--record --group {group} --tag {REPO},{GITHUB_EVENT_NAME} "
             f"--parallel --ci-build-id {build_id} "
@@ -136,6 +137,7 @@ def main() -> None:
     spec_list = groups[group_id]
     cmd = get_cypress_cmd(spec_list, args.filter, args.group, args.use_dashboard)
     print(f"RUN: {cmd}")
+    os.environ["DEBUG"] = "cypress:*,@cypress/*"
     if not args.dry_run:
         subprocess.run(cmd, shell=True, check=True, stdout=None, stderr=None)