Skip to content

Conversation

@jason810496
Copy link
Member

@jason810496 jason810496 commented Dec 24, 2025

related: #57219

Why

After Auto-compile UI assets on Breeze start-airflow command #57219, we could breeze start-airflow --use-airflow version <pr-number> / <owner/repo:branch> and access the Frontend successfully. We make it happen by:

  1. download node.js
  2. download npm
  3. download pnpm
  4. download repo as tarball from GitHub and extract it
  5. run pnpm build
  6. copy artifact to /usr/python/lib/python3.10/site-packages/airflow/ui/dist

However, if we just want to test the Airflow Core change from someone's PR (e.g. validate API Server TaskInstance Log reading path, check Scheduler behavior but still want to access Frontend for observability, etc), we still need to do the all the steps above just to access Frontend, which is waste of time for test iteration.

Instead, we could just mount the pre-built UI dist from host to Breeze container to save the time, in most of the time, the core change will not impact API Server <-> Frontend behavior. (e.g. When I testing Fix rendering of template fields with start from trigger#55068 recently, there isn't anything related with Frontend, but I still need to access it to check the TaskInstance status. )

What

Add --mount-ui-dist flag for start-airflow command to mount UI dist directly from host to Breeze container without building the whole frontend again to save time.

Verfication

The Screenshot of frontend with --mount-ui-dist, the middle of it should be navy blue color instead of pure black if we are using 3.1.5 The Screenshot of frontend without --mount-ui-dist
--mount-ui-dist without --mount-ui-dist

Output of breeze start-airflow --backend postgres --mount-sources providers-and-tests --use-airflow-version apache/airflow:main --mount-ui-dist

Skipping downloading Airflow source tarball - using mounted UI dist from host.
Copying pre-built UI dist from mounted location
Copied UI dist from '/opt/airflow/.build/ui-dist/main' to '/usr/python/lib/python3.10/site-packages/airflow/ui/dist'
Copied UI dist from '/opt/airflow/.build/ui-dist/simple-auth' to '/usr/python/lib/python3.10/site-packages/airflow/api_fastapi/auth/managers/simple/ui/dist'

Copy link
Contributor

@amoghrajesh amoghrajesh left a comment

Choose a reason for hiding this comment

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

Nice!

@potiuk
Copy link
Member

potiuk commented Dec 24, 2025

Very cool idea!

But it can be done way simpler I think. You can likely directly mount the dist folder directly to the sources of airflow - it should be completely no problem to mount it to already mounted folder, docker should nicely handle it.

Copy link
Member

@gopidesupavan gopidesupavan left a comment

Choose a reason for hiding this comment

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

nice addition :)

Copy link
Member Author

@jason810496 jason810496 left a comment

Choose a reason for hiding this comment

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

Hmm. I thinl rather than doing this copy, we could simply mount the folder directly where it is expected to be? I don't think we need to use the temporary folder to copy it from there inside?

Yes, very agree with that! It's way more better to mount it directly to library path.

@jason810496 jason810496 marked this pull request as draft December 24, 2025 11:46
@jason810496 jason810496 force-pushed the ci/breeze/mount-ui-dist branch from e296418 to 814b3bf Compare December 24, 2025 13:16
@jason810496 jason810496 marked this pull request as ready for review December 24, 2025 13:16
Copy link
Member Author

@jason810496 jason810496 left a comment

Choose a reason for hiding this comment

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

Thanks all for the review! I just refactored as directly mount to correct path instead of copying from tmp path.

Copy link
Contributor

@shahar1 shahar1 left a comment

Choose a reason for hiding this comment

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

Looks like a great feature to have, one comment though :)

@potiuk potiuk merged commit 01fe16d into apache:main Dec 26, 2025
126 checks passed
@github-actions
Copy link

Backport failed to create: v3-1-test. View the failure log Run details

Status Branch Result
v3-1-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 01fe16d v3-1-test

This should apply the commit to the v3-1-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

amoghrajesh added a commit to astronomer/airflow that referenced this pull request Dec 29, 2025
* Add --mount-ui-dist flag for Breeze start-airflow

* Update dev/breeze/src/airflow_breeze/commands/common_options.py

Co-authored-by: Amogh Desai <[email protected]>

* Directly mount UI dist to library path

breeze setup regenerate-command-images --force

* breeze setup regenerate-command-images --force

* Use PYTHON_MAJOR_MINOR_VERSION env instead of hardcoded 3.10

---------

Co-authored-by: Amogh Desai <[email protected]>
Subham-KRLX pushed a commit to Subham-KRLX/airflow that referenced this pull request Jan 2, 2026
* Add --mount-ui-dist flag for Breeze start-airflow

* Update dev/breeze/src/airflow_breeze/commands/common_options.py

Co-authored-by: Amogh Desai <[email protected]>

* Directly mount UI dist to library path

breeze setup regenerate-command-images --force

* breeze setup regenerate-command-images --force

* Use PYTHON_MAJOR_MINOR_VERSION env instead of hardcoded 3.10

---------

Co-authored-by: Amogh Desai <[email protected]>
stegololz pushed a commit to stegololz/airflow that referenced this pull request Jan 9, 2026
* Add --mount-ui-dist flag for Breeze start-airflow

* Update dev/breeze/src/airflow_breeze/commands/common_options.py

Co-authored-by: Amogh Desai <[email protected]>

* Directly mount UI dist to library path

breeze setup regenerate-command-images --force

* breeze setup regenerate-command-images --force

* Use PYTHON_MAJOR_MINOR_VERSION env instead of hardcoded 3.10

---------

Co-authored-by: Amogh Desai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants