Skip to content

Commit

Permalink
Initialize new airflow/ui directory
Browse files Browse the repository at this point in the history
configure flask blueprint and render real dags list

Add banner to switch back and forth between UIs

Add readme

basic test setup, chakra not working

Move Flask blueprint, build navbar

Switch to react with working tests

Basic hot refresh

add prettier

do not render the new UI banner on loggin page

add pre-commits to ui

add CI integration

update doc accordingly

redirect to login page on 401+403 errors

update lint command

update lint, lint:fix command

Add codegen to pre-commit

Add ui to breeze

Update build commands
  • Loading branch information
bbovenzi committed Aug 28, 2024
1 parent e55ecd5 commit 9344a3d
Show file tree
Hide file tree
Showing 78 changed files with 28,885 additions and 274 deletions.
1 change: 1 addition & 0 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ labelPRBasedOnFilePath:
- airflow/www/webpack.config.js
- airflow/www/yarn.lock
- docs/apache-airflow/ui.rst
- airflow/ui/**/*

area:CLI:
- airflow/cli/**/*.py
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/basic-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ on: # yamllint disable-line rule:truthy
description: "The array of labels (in json form) determining public runners."
required: true
type: string
run-ui-tests:
description: "Whether to run UI tests (true/false)"
required: true
type: string
run-www-tests:
description: "Whether to run WWW tests (true/false)"
required: true
Expand Down Expand Up @@ -83,6 +87,36 @@ jobs:
- run: python -m pytest -n auto --color=yes
working-directory: ./dev/breeze/


tests-ui:
timeout-minutes: 10
name: React UI tests
runs-on: ${{ fromJSON(inputs.runs-on-as-json-public) }}
if: inputs.run-ui-tests == 'true'
steps:
- name: "Cleanup repo"
shell: bash
run: docker run -v "${GITHUB_WORKSPACE}:/workspace" -u 0:0 bash -c "rm -rf /workspace/*"
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Cleanup docker"
run: ./scripts/ci/cleanup_docker.sh
- name: "Setup node"
uses: actions/setup-node@v4
with:
node-version: 21
- name: "Cache eslint"
uses: actions/cache@v4
with:
path: 'airflow/www/node_modules'
key: ${{ runner.os }}-www-node-modules-${{ hashFiles('airflow/ui/**/pnpm-lock.yaml') }}
- run: cd airflow/ui && pnpm install --frozen-lockfile
- run: cd airflow/ui && pnpm test
env:
FORCE_COLOR: 2

tests-www:
timeout-minutes: 10
name: React WWW tests
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
skip-provider-tests: ${{ steps.selective-checks.outputs.skip-provider-tests }}
run-tests: ${{ steps.selective-checks.outputs.run-tests }}
run-amazon-tests: ${{ steps.selective-checks.outputs.run-amazon-tests }}
run-ui-tests: ${{ steps.selective-checks.outputs.run-ui-tests }}
run-www-tests: ${{ steps.selective-checks.outputs.run-www-tests }}
run-kubernetes-tests: ${{ steps.selective-checks.outputs.run-kubernetes-tests }}
basic-checks-only: ${{ steps.selective-checks.outputs.basic-checks-only }}
Expand Down Expand Up @@ -168,6 +169,7 @@ jobs:
uses: ./.github/workflows/basic-tests.yml
with:
runs-on-as-json-public: ${{ needs.build-info.outputs.runs-on-as-json-public }}
run-ui-tests: ${{needs.build-info.outputs.run-ui-tests}}
run-www-tests: ${{needs.build-info.outputs.run-www-tests}}
needs-api-codegen: ${{needs.build-info.outputs.needs-api-codegen}}
default-python-version: ${{needs.build-info.outputs.default-python-version}}
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ node_modules
npm-debug.log*
derby.log
metastore_db
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
.vscode/*
!.vscode/extensions.json

# Airflow log files when airflow is run locally
airflow-*.err
Expand Down
Loading

0 comments on commit 9344a3d

Please sign in to comment.