You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2026/08/01 21:33:39 UTC

[I] Migrate UI's deep monaco-editor imports so it can move past 0.55.1 [airflow]

potiuk opened a new issue, #70929:
URL: https://github.com/apache/airflow/issues/70929

   ### What
   
   `monaco-editor` cannot be upgraded past **0.55.1** until the UI's deep imports are migrated. Both grouped bump PRs were closed rather than merged:
   
   - #70873 (`main`)
   - #70854 (`v3-3-test`)
   
   Both failed identically on `Basic tests / React UI tests`, `CI image checks / Static checks`, and `Generate constraints`.
   
   ### Why it breaks
   
   0.56.0 rewrote the package `exports` map:
   
   ```jsonc
   // 0.55.1                     // 0.56.0
   "./*": "./*"                  "./*.js": "./esm/vs/*.js",
                                 "./*":    "./esm/vs/*.js"
   ```
   
   Subpaths are now rooted *inside* `esm/vs/`, so every existing `monaco-editor/esm/vs/X` specifier doubles the prefix. Verified by resolving against 0.56.0:
   
   ```
   monaco-editor/esm/vs/editor/editor.api.js  ->  esm/vs/esm/vs/editor/editor.api.js   (does not exist)
   monaco-editor/editor/editor.api.js         ->  esm/vs/editor/editor.api.js          OK
   ```
   
   One unresolvable import explains all three failures:
   
   - TypeScript cannot resolve the module, so it is `any` — **26 `@typescript-eslint/no-unsafe-*` errors**, all in `configureMonaco.ts` and `pythonFStrings.test.ts`
   - Vite/Rolldown cannot resolve it — `[vite]: Rolldown failed to resolve import "monaco-editor/esm/vs/editor/editor.api.js"` — so the build fails and the dev server never starts, giving `ECONNREFUSED ::1:3000` in the React UI tests
   
   ### Work needed
   
   14 import sites across 3 files (`configureMonaco.ts`, `pythonFStrings.test.ts`, `vite-env.d.ts`):
   
   1. **Drop the `esm/vs/` prefix** from every specifier — mechanical.
   2. **Move the Python grammar**: `esm/vs/basic-languages/python/python.js` → `esm/vs/languages/definitions/python/python.js`, plus a new `register.js`. The old path no longer ships.
   3. **Codicon CSS — the unsolved part.** `codicon.css` and `codicon-modifiers.css` have *no* working spelling in 0.56.0: the `"./*"` fallback appends `.js`, so both old and new forms resolve to `codicon.css.js`. The files still ship, but are unreachable through the exports map. Needs a decision on how consumers are meant to pull codicon styles in 0.56 (bundler alias, direct path, or upstream guidance).
   
   Item 3 is the blocker; 1 and 2 are straightforward.
   
   ### Acceptance criteria
   
   - `monaco-editor` moves to 0.56.x on `main` with React UI tests, static checks, and constraints all green
   - Folding/find glyphs still render (the codicon styles are what item 3 protects)
   - Python syntax highlighting and the f-string patching still work
   - Backported to the active release branch
   
   ### Notes
   
   `configureMonaco.ts` already carries comments about 0.53 removing `codiconStyles` — this package churns its internal layout regularly, so the migration should prefer documented public entry points over deep paths where possible.
   


-- 
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: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Migrate UI's deep monaco-editor imports so it can move past 0.55.1 [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #70929:
URL: https://github.com/apache/airflow/issues/70929#issuecomment-5153548376

   cc: @pierrejeambrun @bbovenzi 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Migrate UI's deep monaco-editor imports so it can move past 0.55.1 [airflow]

Posted by "ChandelAnushka (via GitHub)" <gi...@apache.org>.
ChandelAnushka commented on issue #70929:
URL: https://github.com/apache/airflow/issues/70929#issuecomment-5155102017

   /assign


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Migrate UI's deep monaco-editor imports so it can move past 0.55.1 [airflow]

Posted by "szzhoujiarui (via GitHub)" <gi...@apache.org>.
szzhoujiarui commented on issue #70929:
URL: https://github.com/apache/airflow/issues/70929#issuecomment-5154832972

   I'd like to work on this. I plan to migrate the current selective imports to Monaco 0.56's supported public entry points: monaco-editor/editor, the folding/find/codicon feature register modules, the JSON feature register module, and the reorganized worker and Python definition paths. I will keep Airflow's explicit patched Python grammar registration so Monaco's lazy Python provider does not overwrite the f-string patch, then verify the focused tokenizer tests, lint/type checks, UI build, and folding/find glyph assets. I use AI assistance for investigation and implementation support; I will review every change, run the relevant tests, and take full responsibility for the contribution.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Migrate UI's deep monaco-editor imports so it can move past 0.55.1 [airflow]

Posted by "szzhoujiarui (via GitHub)" <gi...@apache.org>.
szzhoujiarui commented on issue #70929:
URL: https://github.com/apache/airflow/issues/70929#issuecomment-5154867164

   I'd like to work on this.
   
   My implementation plan is:
   
   - Migrate the selective Monaco imports to the supported 0.56 public entry points: `monaco-editor/editor`, the folding/find/codicon feature register modules, and the JSON feature register module.
   - Migrate the editor worker, JSON worker, and Python grammar to their reorganized 0.56 paths.
   - Keep Airflow's explicit patched Python grammar registration so the f-string patch remains the active token provider.
   - Update `monaco-editor` to 0.56.x and regenerate the pnpm lockfile.
   - Verify the focused Python tokenizer tests, UI lint and type checks, UI build, and folding/find glyph assets.
   
   I use AI assistance for investigation and implementation support. I will review every change, run the relevant tests, and take full responsibility for the contribution.
   
   ---
   Drafted-by: MonkeyCode (GPT-5.6 Sol); reviewed by @szzhoujiarui before posting


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Migrate UI's deep monaco-editor imports so it can move past 0.55.1 [airflow]

Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi closed issue #70929: Migrate UI's deep monaco-editor imports so it can move past 0.55.1
URL: https://github.com/apache/airflow/issues/70929


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org