Skip to content

Compile assets when installing airflow from Github Branch in Breeze #54453

@potiuk

Description

@potiuk

We have the option to install airflow from GitHub branc in Breeze (#54070) , but currently it does not complie assets and you can'r really "start-airflow" and see the UI properly when you install Breeze this way

The problem with it is that we currently run asset compilation outside of breeze - but the installation with --use-airflow-version already happens fully in breeze. And we have no node/yarn/pnpm installed in CI image.... The problem is that when we install from GitHub URL - we do not have local sources (which would be a different version) so even if you could run breeze command inside breeze (technically such inception shoud be possible- because we also forward docker socket to inside breeze) - what you really need is you need to:

  1. install node + yarn + pnpm
  2. find the directory in site-packages where airflow UI javascript sources are installed
  3. run appropriate npm commands

Not a rocket science but it will take a bit of time to run, and it should be done somewhere here: https://github.com/apache/airflow/blob/main/scripts/in_container/install_airflow_and_providers.py#L767 -> this is where the command to install stuff when --use-airflow-version is actually executed - and "airflow-core" should be installed right after - you should probably naed to add a flag in the InstallationSpec (compile_assets) and set it to true somewhere here - https://github.com/apache/airflow/blob/main/scripts/in_container/install_airflow_and_providers.py#L325 - because this is where we determine what "pip install" to add based on the --use-airflow flag.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:dev-envCI, pre-commit, pylint and other changes that do not change the behavior of the final code

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions