The GitHub Actions job "Tests (AMD)" on airflow.git/v3-2-test has failed.
Run started by GitHub user vatsrahul1001 (triggered by vatsrahul1001).

Head commit for run:
9b1bd3d8d6ba7a4f6b5e1c7f562ba0602b3dc7ec / github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
[v3-2-test] UI: Rewrite modulepreload hrefs to the api-server static path 
(#67548) (#67556)

* UI: Fix Monaco workers crashing in production mode

`?url` does not run the Vite worker pipeline. For `editor.worker.js` it
inlines the raw source as a base64 data URL (the source is below the
default `assetsInlineLimit`), and the inlined module still has bare
specifier imports it cannot resolve in a Worker context. For
`json.worker.js` it copies a partly-bundled file whose top-level
`import '../../editor/editor.worker.js'` resolves to a path that does
not exist in the build output. Both cases manifest at runtime as
"Could not create web worker(s). Falling back to loading web worker
code in main thread" followed by a stream of fallback fetch errors.

Switch to `?worker&url`: Vite runs the file through the worker pipeline
(bundling all dependencies into a self-contained IIFE) and the URL
query suffix returns the resulting URL as a string instead of a Worker
constructor. The Blob shim from #67352 then imports a properly bundled
worker, restoring real worker-thread execution.

* UI: Rewrite modulepreload hrefs to the api-server static path

Vite emits both `<script src="./assets/...">` and
`<link rel="modulepreload" href="./assets/...">` for chunks in the
built `index.html`. The `transform-url-src` plugin only rewrote
`src="./assets/"` to `src="./static/assets/"`, leaving the
modulepreload `href`s untouched. Behind the api-server's `/static/`
mount those preload requests hit the SPA HTML fallback and the
browser fails them with `Expected a JavaScript-or-Wasm module script
but the server responded with a MIME type of "text/html"`. The chunks
themselves still load via `<script src>` so the app works, but every
page load wastes three round-trips on the failed preloads and floods
the console.

Apply the same `static/` rewrite to `href="./assets/"` and switch all
three rewrites to `replaceAll` so multiple matches (one per chunk) are
handled — `replace` with a string only touches the first occurrence.

---------
(cherry picked from commit eff567c7e607ecd744d4ec4dc5e7a6fedb33663c)

Co-authored-by: Pierre Jeambrun <[email protected]>
Co-authored-by: Rahul Vats <[email protected]>

Report URL: https://github.com/apache/airflow/actions/runs/26458935207

With regards,
GitHub Actions via GitBox


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

Reply via email to