sadpandajoe commented on code in PR #45608:
URL: https://github.com/apache/superset/pull/45608#discussion_r4345748791


##########
.github/workflows/superset-e2e.yml:
##########
@@ -135,6 +135,28 @@ jobs:
           node-version-file: "./superset-frontend/.nvmrc"
           cache: "npm"
           cache-dependency-path: "superset-frontend/package-lock.json"
+      # The instrumented production assets, keyed on the frontend sources and
+      # lockfile. `build-instrumented-assets` skips the webpack build when the
+      # manifest is already there. (The cached-dependencies helpers that used
+      # to cache these call a retired cache API and never saved anything, so
+      # every Playwright job was rebuilding.)
+      - name: Restore instrumented assets
+        uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
+        with:
+          # webpack writes the service worker one level up from the assets
+          # directory (see the `../service-worker.js` filename rule in
+          # webpack.config.js), and the GAQ tests assert on console errors,
+          # so it has to travel with the assets.
+          path: |
+            superset/static/assets
+            superset/static/service-worker.js
+          key: >-
+            instrumented-assets-${{ 
hashFiles('.github/workflows/superset-e2e.yml',

Review Comment:
   The key doesn't hash the root-level `superset_text.yml`, but 
`superset-frontend/src/utils/textUtils.ts` pulls it into the webpack bundle via 
`require('../../../superset_text.yml')`. A PR that edits that file (it matches 
the change-detector's python group, so E2E still runs) restores master's cached 
assets on a key hit, and `build-instrumented-assets` then skips the build 
because `manifest.json` exists. The Playwright jobs would exercise the old text 
config instead of the PR's. The same list is duplicated in 
`playwright-tests-gaq` (around line 408). Should `superset_text.yml` be added 
to both `hashFiles(...)` lists?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to