Skip to content

Conversation

@KatalKavya96
Copy link
Contributor

@KatalKavya96 KatalKavya96 commented Sep 12, 2025

Summary

  • Upgrade frontend build/test tooling to current majors:

  • Vite → v7 and Vitest → v3 across UI packages.

  • Switch coverage to @vitest/coverage-v8 where applicable.

  • Set "engines": { "node": ">=22" } for packages that build UI assets (per maintainer guidance that Node 22 is acceptable for dev/asset builds).

Packages updated

  • airflow-core/src/airflow/ui

  • airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui

  • dev/react-plugin-tools/react_plugin_template

  • providers/edge3/src/airflow/providers/edge3/plugins/www

Notes

  • No runtime feature changes; these are dev/build-time upgrades only.

  • Vite configs for the plugin template and Edge provider were minimally touched to remain compatible with Vite 7 and preserve existing behavior.

  • No built artifacts are committed; only package.json and subpackage pnpm-lock.yaml updates.

Verification (local)

  • For each package:

pnpm install

pnpm build (Vite 7)

pnpm test -- --run (Vitest 3, with @vitest/coverage-v8 where defined)

All builds succeeded and tests passed locally. Any transient ECONNREFUSED :3000 console noise observed during tests does not affect pass status.

Follow-ups (if desired)

  • If the project wants a repo-wide Node bump, a separate PR can update .nvmrc/docs. This PR limits Node >=22 to the UI packages that need it.

closes: #55562

@boring-cyborg
Copy link

boring-cyborg bot commented Sep 12, 2025

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@boring-cyborg boring-cyborg bot added area:API Airflow's REST/HTTP API area:dev-tools area:providers area:UI Related to UI/UX. For Frontend Developers. provider:edge Edge Executor / Worker (AIP-69) / edge3 labels Sep 12, 2025
Copy link
Member

@ashb ashb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll need one of @pierrejeambrun @bbovenzi to look at this too.

I wonder if this has any run-time implications for UI React plugins now I think about it 🤔

environment: "happy-dom",
globals: true,
mockReset: true,
passWithNoTests: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this flag mean/do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this flag mean/do?
It is a vitest only option that makes the run succeed when no test files are found otherwise vitest exits with code 1. I added it because the React plugin template and Edge plugin currently have no tests, so CI would fail.
This key is only read by Vitest and Vite ignores test so there is no runtime/build impact on UI React plugins.
If you prefer to keep vite.config.ts build only, I can move it to the script instead: vitest run --passWithNoTests, or drop it and add a tiny placeholder test.

@jscheffl
Copy link
Contributor

@KatalKavya96 thanks for bumping the dependencies! I also wanted to get started with this.

Unfortunately atm the compiled assets for the edge plugin are checked in (and not dynamically compiled) therefore static checks fail.
To fix, can you run prek run compile-edge-assets -a and commit the compiled files?
Also ts-compile-lint-edge-ui and ts-compile-lint-ui fail and need to be fixed.
As parallel changes were made, please rebase before building the files.

(I'd push the fix to your branch but unfortunately I am not able to, Github does not allow me :-( )

@KatalKavya96
Copy link
Contributor Author

@KatalKavya96 thanks for bumping the dependencies! I also wanted to get started with this.

Unfortunately atm the compiled assets for the edge plugin are checked in (and not dynamically compiled) therefore static checks fail. To fix, can you run prek run compile-edge-assets -a and commit the compiled files? Also ts-compile-lint-edge-ui and ts-compile-lint-ui fail and need to be fixed. As parallel changes were made, please rebase before building the files.

(I'd push the fix to your branch but unfortunately I am not able to, Github does not allow me :-( )

Thanks for the clear pointers!
I will rebase onto the latest main, run prek run compile-edge-assets -a and commit the generated assets, then fix anything from prek run ts-compile-lint-ui and prek run ts-compile-lint-edge-ui.
No worries I will make the changes and recommit.

Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this and changes look good (after fixing static checks locally). Plugins still working good. Clicked a bit around in UI and no issue "seen" - but was just doing basic tests of critical UI elements.

I would like a second pair of expert review by @bbovenzi or @pierrejeambrun - but from my side "green light" (Can be merged of course only after fixing static checks...)

@KatalKavya96 KatalKavya96 force-pushed the chore/vite-vitest-update-55562 branch from dfb6e3e to e1bc7c0 Compare September 12, 2025 23:08
@KatalKavya96
Copy link
Contributor Author

KatalKavya96 commented Sep 12, 2025

@jscheffl Thanks! I fixed the eslint issues and prek run compile-edge-assets -a . I messed up rebase/branching and the PR branch diverged. Kindly test the latest commit and suggest any changes and cleanups

@jscheffl
Copy link
Contributor

@jscheffl Thanks! I fixed the eslint issues and prek run compile-edge-assets -a . I messed up rebase/branching and the PR branch diverged. Kindly test the latest commit and suggest any changes and cleanups

Thanks! I think this looks good still. No need to worry, the last commit made all good.
Unfortunately I over-looked the order and just merged another PR which (again) generated a merge conflict :-( Sorry... should have applied your's first...
Can you once more rebase/merge and re-run the prek run compile-edge-assets -a ? This will resolve the conflicts in compiled code.
Then I'd make a final test and merge.

As (I don't know why) can not push to your branch (even I am maintainer) the other alternative would be taking your commits into an own branch and opening another PR... but would leave the credits for the fixes to you :-D

@jscheffl
Copy link
Contributor

You can also cherry-pick the merge from PR # #55617 ... if that is easier.

@KatalKavya96 KatalKavya96 force-pushed the chore/vite-vitest-update-55562 branch from d3ab321 to d4cdee9 Compare September 13, 2025 08:12
@KatalKavya96
Copy link
Contributor Author

KatalKavya96 commented Sep 13, 2025

@jscheffl I tried syncing my fork , merging conflicts , rebasing and commiting the latest but somehow it has closed this PR, Please suggest me next course of action as i am kind of stuck here. Should i create a new PR?

@jscheffl
Copy link
Contributor

@jscheffl I tried syncing my fork , merging conflicts , rebasing and commiting the latest but somehow it has closed this PR, Please suggest me next course of action as i am kind of stuck here

Sometimes can happen that you mess-up your rebase/merge. Seems you re-based and I assume commits are "gone". If you are uncertain hard to know what you did locally. Have you tried git rebase --continue?

Otherwise I can offer taking over to my PR or you open another PR... (Would leave the credit for PR to you but I see your commits are also on my PR so post-merge commits "from you" are also in the codebase :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:dev-tools area:providers area:UI Related to UI/UX. For Frontend Developers. provider:edge Edge Executor / Worker (AIP-69) / edge3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade Vite and vitest dependencies to latest major version

3 participants