Repository: deephaven/deephaven-plugins (language: python)

Issue:
Upgrade Playwright to v1.44.0
Make sure correct version of Node is used. 

See https://github.com/deephaven/web-client-ui/pull/1998 for reference.


Discussion / hints:

Fix patch:
diff --git a/package-lock.json b/package-lock.json
index e8211b7da..9e40899e9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,8 +13,8 @@
         "@deephaven/eslint-config": "^0.72.0",
         "@deephaven/prettier-config": "^0.72.0",
         "@deephaven/tsconfig": "^0.72.0",
-        "@playwright/test": "^1.41.2",
-        "@testing-library/jest-dom": "^5.16.4",
+        "@playwright/test": "^1.44.1",
+        "@testing-library/jest-dom": "^5.17.0",
         "@testing-library/react": "^12.1.3",
         "@testing-library/react-hooks": "^8.0.1",
         "@testing-library/user-event": "^14.4.3",
@@ -7794,12 +7794,12 @@
       }
     },
     "node_modules/@playwright/test": {
-      "version": "1.41.2",
-      "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.41.2.tgz",
-      "integrity": "sha512-qQB9h7KbibJzrDpkXkYvsmiDJK14FULCCZgEcoe2AvFAS64oCirWTwzTlAYEbKaRxWs5TFesE1Na6izMv3HfGg==",
+      "version": "1.44.1",
+      "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.44.1.tgz",
+      "integrity": "sha512-1hZ4TNvD5z9VuhNJ/walIjvMVvYkZKf71axoF/uiAqpntQJXpG64dlXhoDXE3OczPuTuvjf/M5KWFg5VAVUS3Q==",
       "dev": true,
       "dependencies": {
-        "playwright": "1.41.2"
+        "playwright": "1.44.1"
       },
       "bin": {
         "playwright": "cli.js"
@@ -28091,12 +28091,12 @@
       }
     },
     "node_modules/playwright": {
-      "version": "1.41.2",
-      "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.41.2.tgz",
-      "integrity": "sha512-v0bOa6H2GJChDL8pAeLa/LZC4feoAMbSQm1/jF/ySsWWoaNItvrMP7GEkvEEFyCTUYKMxjQKaTSg5up7nR6/8A==",
+      "version": "1.44.1",
+      "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.44.1.tgz",
+      "integrity": "sha512-qr/0UJ5CFAtloI3avF95Y0L1xQo6r3LQArLIg/z/PoGJ6xa+EwzrwO5lpNr/09STxdHuUoP2mvuELJS+hLdtgg==",
       "dev": true,
       "dependencies": {
-        "playwright-core": "1.41.2"
+        "playwright-core": "1.44.1"
       },
       "bin": {
         "playwright": "cli.js"
@@ -28109,9 +28109,9 @@
       }
     },
     "node_modules/playwright-core": {
-      "version": "1.41.2",
-      "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.41.2.tgz",
-      "integrity": "sha512-VaTvwCA4Y8kxEe+kfm2+uUUw5Lubf38RxF7FpBxLPmGe5sdNkSg5e3ChEigaGrX7qdqT3pt2m/98LiyvU2x6CA==",
+      "version": "1.44.1",
+      "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.44.1.tgz",
+      "integrity": "sha512-wh0JWtYTrhv1+OSsLPgFzGzt67Y7BE/ZS3jEqgGBlp2ppp1ZDj8c+9IARNW4dwf1poq5MgHreEM2KV/GuR4cFA==",
       "dev": true,
       "bin": {
         "playwright-core": "cli.js"
@@ -43054,12 +43054,12 @@
       "peer": true
     },
     "@playwright/test": {
-      "version": "1.41.2",
-      "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.41.2.tgz",
-      "integrity": "sha512-qQB9h7KbibJzrDpkXkYvsmiDJK14FULCCZgEcoe2AvFAS64oCirWTwzTlAYEbKaRxWs5TFesE1Na6izMv3HfGg==",
+      "version": "1.44.1",
+      "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.44.1.tgz",
+      "integrity": "sha512-1hZ4TNvD5z9VuhNJ/walIjvMVvYkZKf71axoF/uiAqpntQJXpG64dlXhoDXE3OczPuTuvjf/M5KWFg5VAVUS3Q==",
       "dev": true,
       "requires": {
-        "playwright": "1.41.2"
+        "playwright": "1.44.1"
       }
     },
     "@plotly/d3": {
@@ -58460,13 +58460,13 @@
       }
     },
     "playwright": {
-      "version": "1.41.2",
-      "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.41.2.tgz",
-      "integrity": "sha512-v0bOa6H2GJChDL8pAeLa/LZC4feoAMbSQm1/jF/ySsWWoaNItvrMP7GEkvEEFyCTUYKMxjQKaTSg5up7nR6/8A==",
+      "version": "1.44.1",
+      "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.44.1.tgz",
+      "integrity": "sha512-qr/0UJ5CFAtloI3avF95Y0L1xQo6r3LQArLIg/z/PoGJ6xa+EwzrwO5lpNr/09STxdHuUoP2mvuELJS+hLdtgg==",
       "dev": true,
       "requires": {
         "fsevents": "2.3.2",
-        "playwright-core": "1.41.2"
+        "playwright-core": "1.44.1"
       },
       "dependencies": {
         "fsevents": {
@@ -58479,9 +58479,9 @@
       }
     },
     "playwright-core": {
-      "version": "1.41.2",
-      "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.41.2.tgz",
-      "integrity": "sha512-VaTvwCA4Y8kxEe+kfm2+uUUw5Lubf38RxF7FpBxLPmGe5sdNkSg5e3ChEigaGrX7qdqT3pt2m/98LiyvU2x6CA==",
+      "version": "1.44.1",
+      "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.44.1.tgz",
+      "integrity": "sha512-wh0JWtYTrhv1+OSsLPgFzGzt67Y7BE/ZS3jEqgGBlp2ppp1ZDj8c+9IARNW4dwf1poq5MgHreEM2KV/GuR4cFA==",
       "dev": true
     },
     "plotly.js": {
diff --git a/package.json b/package.json
index 59f0fce2c..dceadf647 100644
--- a/package.json
+++ b/package.json
@@ -28,8 +28,8 @@
     "@deephaven/eslint-config": "^0.72.0",
     "@deephaven/prettier-config": "^0.72.0",
     "@deephaven/tsconfig": "^0.72.0",
-    "@playwright/test": "^1.41.2",
-    "@testing-library/jest-dom": "^5.16.4",
+    "@playwright/test": "^1.44.1",
+    "@testing-library/jest-dom": "^5.17.0",
     "@testing-library/react": "^12.1.3",
     "@testing-library/react-hooks": "^8.0.1",
     "@testing-library/user-event": "^14.4.3",
diff --git a/tools/run_docker.sh b/tools/run_docker.sh
index f930b0295..f817d8c45 100755
--- a/tools/run_docker.sh
+++ b/tools/run_docker.sh
@@ -4,15 +4,17 @@
 pushd "$(dirname "$0")"
 
 # Start the containers
-if [[ -z "${CI}" ]]; then
-  docker compose -f ../tests/docker-compose.yml run --service-ports --rm --build "$@"
-  exit_code=$?
-  docker compose -f ../tests/docker-compose.yml down
-else
-  docker compose -f ../tests/docker-compose.yml run --service-ports --rm --build -e CI=true "$@"
+if [[ "${CI}" == "1" || "${CI}" == "true" ]]; then
+  # In CI, keep the container in case we need to dump logs in another
+  # step of the GH action. It should be cleaned up automatically by the CI runner.
+  docker compose -f ../tests/docker-compose.yml run --service-ports --build -e CI=true "$@"
   exit_code=$?
   # stop instead of down to preserve container logs
   docker compose -f ../tests/docker-compose.yml stop deephaven-plugins
+else
+  docker compose -f ../tests/docker-compose.yml run --service-ports --rm --build "$@"
+  exit_code=$?
+  docker compose -f ../tests/docker-compose.yml down
 fi
 
 # Reset pwd


Test patch:
diff --git a/tests/Dockerfile b/tests/Dockerfile
index 48eed433f..dc2bdd12d 100644
--- a/tests/Dockerfile
+++ b/tests/Dockerfile
@@ -1,7 +1,7 @@
 # syntax=docker/dockerfile:1
 
 # Dockerfile for running and updating snapshots locally and on CI
-FROM mcr.microsoft.com/playwright:v1.41.2-jammy AS playwright
+FROM mcr.microsoft.com/playwright:v1.44.1-jammy AS playwright
 WORKDIR /work/
 
 # Update packages list and install some build tools.
@@ -14,6 +14,29 @@ RUN set -eux; \
 
 RUN fc-list : family;
 
-RUN npm install @playwright/test@1.41.2
+# Copy just the .nvmrc first and install nvm/node/npm first as these will change the least often
+# https://docs.docker.com/build/cache/
+COPY .nvmrc .
+
+# nvm needs to be run in a bash shell
+SHELL ["/bin/bash", "--login", "-c"]  
+# The default `.bashrc` bails on the first line if not in interactive shell. 
+# We can just empty it so that the nvm install below will actually run when sourcing 
+# `.bashrc`  
+RUN echo "" > /root/.bashrc  
+RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
+RUN source /root/.bashrc && nvm install
+
+# Now clobber the default node installed by the playwright
+# image so that the commands in docker compose entrypoint will 
+# also use the correct version of node without running in bash
+RUN ln -s $(which node) /usr/local/bin/nodejs
+RUN ln -s $(which node) /usr/local/bin/node
+RUN ln -s $(which npm) /usr/local/bin/npm
+
+# Confirm node version is correct for debugging
+RUN node --version
+
+RUN npm install @playwright/test@1.44.1
 COPY playwright.config.ts .
 COPY playwright-docker.config.ts .