Skip to content

Instantly share code, notes, and snippets.

@kaxil
Last active January 22, 2025 12:10
Show Gist options
  • Save kaxil/7891b0327bf9f0c494a42a163c8c2664 to your computer and use it in GitHub Desktop.
Save kaxil/7891b0327bf9f0c494a42a163c8c2664 to your computer and use it in GitHub Desktop.
Run Airflow 3 from main
COMMIT_SHA=573cd95 AIRFLOW_HOME=$(pwd) uvx \
--python 3.11 \
--from "git+https://github.com/apache/airflow@$COMMIT_SHA" \
--with "git+https://github.com/apache/airflow@$COMMIT_SHA#egg=apache-airflow-task-sdk&subdirectory=task_sdk" \
--with "git+https://github.com/apache/airflow@$COMMIT_SHA#egg=local-providers&subdirectory=providers" \
bash -c "
cd \$(python -c 'import airflow, os; print(os.path.dirname(airflow.__file__))') && \
# Build the new UI only if it hasn't been built
if [ ! -d 'ui/dist' ]; then
echo 'Building new UI...'
cd ui && pnpm install && pnpm build && cd ..
else
echo 'New UI is already built. Skipping.'
fi && \
# Build the legacy UI only if it hasn't been built
if [ ! -d 'www/static/dist' ]; then
echo 'Building legacy UI...'
cd www && yarn install --frozen-lockfile && yarn run build && cd ..
else
echo 'Legacy UI is already built. Skipping.'
fi && \
# Start Airflow
airflow standalone
"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment