Enable dynamic generation of assets for Edge UI Plugin#56456
Enable dynamic generation of assets for Edge UI Plugin#56456jscheffl merged 20 commits intoapache:mainfrom
Conversation
|
I looked at things we can do, and I think the easiest thing (and also something we could also switch to in airflow-core is https://github.com/rmorshea/hatch-build-scripts. This way we wil likely be able to get rid of hatch_build.py altogether most likely and only rely on running prek to install npm and build the assets |
|
Also - as discussed - we will have to move the pre-commit config for the provider to inside of it (which is now possible with prek monorepo support) |
9055674 to
575670b
Compare
|
@potiuk as during our jogging-roud - rebase of ~1200 commits. Since then the pre-commit config has been split. Still this is the proposal but quite complex. Have any thoughts matured how to make dynamic asset building possible by other means of rework of provider packaging? |
d56e9d6 to
a98d655
Compare
a98d655 to
9d09609
Compare
* Enable dynamic generation of assets for Edge UI Plugin * Review feedback * Revert changes in template and other providers pyproject.toml * Fixes in config * Exclude __init__.py * Ensure assets are generated on provider packaging * Script beautification * Ensure assets are compiled always * Fix static checks by lazy loading providers details * Fix missing dist in pytest * Fix static check on openapi-spec generation for edge * build assets via pnpm to prevent static check fails * build assets via pnpm to prevent static check fails * Fix hatch to ensure dist is compiled * Call hatch in the venv of breeze tool * Call asset generation script directly w/o prek * Re-add prek dependency during provider build, add prek to GH pipeline * Review feedback and fixes * Use empty env for hatch build for providers * Add prek for constrains generation
* Enable dynamic generation of assets for Edge UI Plugin * Review feedback * Revert changes in template and other providers pyproject.toml * Fixes in config * Exclude __init__.py * Ensure assets are generated on provider packaging * Script beautification * Ensure assets are compiled always * Fix static checks by lazy loading providers details * Fix missing dist in pytest * Fix static check on openapi-spec generation for edge * build assets via pnpm to prevent static check fails * build assets via pnpm to prevent static check fails * Fix hatch to ensure dist is compiled * Call hatch in the venv of breeze tool * Call asset generation script directly w/o prek * Re-add prek dependency during provider build, add prek to GH pipeline * Review feedback and fixes * Use empty env for hatch build for providers * Add prek for constrains generation
* Enable dynamic generation of assets for Edge UI Plugin * Review feedback * Revert changes in template and other providers pyproject.toml * Fixes in config * Exclude __init__.py * Ensure assets are generated on provider packaging * Script beautification * Ensure assets are compiled always * Fix static checks by lazy loading providers details * Fix missing dist in pytest * Fix static check on openapi-spec generation for edge * build assets via pnpm to prevent static check fails * build assets via pnpm to prevent static check fails * Fix hatch to ensure dist is compiled * Call hatch in the venv of breeze tool * Call asset generation script directly w/o prek * Re-add prek dependency during provider build, add prek to GH pipeline * Review feedback and fixes * Use empty env for hatch build for providers * Add prek for constrains generation
So far the generated UI assets for Edge Worker React Plugin were manually compiled and checked-in the repo. This is a bit slowing down parallel development as the generated assets always generate merge conflicts and checking in compiled/generated code in general is not good.
This PR changes the way for Edge to compile React UI assets when
breeze start-airflowas well as when Wheel/Sdist is packaged.This is WIP/Draft to have an early review. Especially looking forward for review by @potiuk as within this PR we need to enable building providers with hatchling selectively which has an impact on reproducible builds and CI ecosystem.
before completion:
A follow-up of this PR would be apply the same to FAB provider and Fab UI.