Skip to content

Conversation

@jason810496
Copy link
Member

@jason810496 jason810496 commented Oct 25, 2025

closes: #54453
related: #54070

Why

After #54070, we are able to use specific airflow-core version for start-airflow command but when we access Airflow UI, it will always show internal server error. Since the UI dist will not be compiled when running start-airflow command.

How

  1. download tarball of source code that --use-airflow-version provided ( /opt/airflow/.build/airflow.tar.gz
  2. extract to /opt/airflow/.build/airflow_source directory
  3. copy source code of
  • Core UI to /opt/airflow/airflow-core/src/airflow/ui
  • Simple Auth Manager UI to /opt/airflow/airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui
  1. install node and pnpm if not existed
  2. run pnpm run build in both UI directories
  3. copy UI dist from Airflow Core Sources Path (/opt/airflow/airflow-core/...) to Airflow Installation Path (e.g. /usr/python/lib/python3.10/site-packages/airflow/...)

What

After this PR, if we run breeze start-airflow with any --use-airflow-version <owner/repo:branch> we could access the UI without API Server response internal error.

For example:

breeze start-airflow --backend postgres --load-example-dags --mount-sources providers-and-tests --use-airflow-version jason810496/airflow:ci/breeze/compile-ui-assets

@boring-cyborg boring-cyborg bot added area:dev-tools backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch labels Oct 25, 2025
Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

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

Very nice! I think one small thing to add is to be able to set

--use-airflow-version=57219

Where the number is a PR#.. We could easily retrieve the repo/branch via gh api.

@potiuk
Copy link
Member

potiuk commented Oct 25, 2025

But this could be "extra".

@potiuk potiuk merged commit 505d9e4 into apache:main Oct 25, 2025
112 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 25, 2025
…57219)

* Compile assets when installing airflow from Github Branch in Breeze

* Only install pnpm

* Fix main UI compliation

* Generalize compile_ui_assets for simple_auth_manager ui

* Remove "no assets compiled" warning

* Fix test due to compile_ui_assets not found
(cherry picked from commit 505d9e4)

Co-authored-by: LIU ZHE YOU <68415893+jason810496@users.noreply.github.com>
@github-actions
Copy link

Backport successfully created: v3-1-test

Status Branch Result
v3-1-test PR Link

potiuk pushed a commit that referenced this pull request Oct 25, 2025
…57219) (#57253)

* Compile assets when installing airflow from Github Branch in Breeze

* Only install pnpm

* Fix main UI compliation

* Generalize compile_ui_assets for simple_auth_manager ui

* Remove "no assets compiled" warning

* Fix test due to compile_ui_assets not found
(cherry picked from commit 505d9e4)

Co-authored-by: LIU ZHE YOU <68415893+jason810496@users.noreply.github.com>
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.

Compile assets when installing airflow from Github Branch in Breeze

2 participants