sadpandajoe commented on code in PR #45608:
URL: https://github.com/apache/superset/pull/45608#discussion_r4354317968
##########
.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 hashes this workflow file but not `.github/workflows/bashlib.sh`,
which is what decides whether the webpack build runs at all (the `[[ -f
"$ASSETS_MANIFEST" ]]` skip lives there). A PR that only changes how
`build-instrumented-assets` invokes the build (an env var, a different script,
a flag) restores the previous assets on a key hit, the manifest check skips the
build, and Playwright runs against the old bundle, so a break from the new
invocation would pass CI. Should `.github/workflows/bashlib.sh` be added to the
`hashFiles(...)` list here and in the `playwright-tests-gaq` job?
--
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]