Skip to content

Commit

Permalink
AIP-79 Generate assets for Flask application in FAB provider (apache#…
Browse files Browse the repository at this point in the history
  • Loading branch information
vincbeck authored Feb 13, 2025
1 parent 8b21b4e commit 7323548
Show file tree
Hide file tree
Showing 25 changed files with 422 additions and 28 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ env/
build/
develop-eggs/
dist/
!providers/fab/**/www/static/dist
downloads/
eggs/
.eggs/
Expand Down
21 changes: 15 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ repos:
- id: insert-license
name: Add license for CSS/JS/JSX/PUML/TS/TSX
files: \.(css|jsx?|puml|tsx?)$
exclude: ^\.github/.*$|^airflow/www/static/js/types/api-generated.ts$|ui/openapi-gen/
exclude: ^\.github/.*$|^airflow/www/static/js/types/api-generated.ts$|ui/openapi-gen/|.*/dist/.*
args:
- --comment-style
- "/*!| *| */"
Expand Down Expand Up @@ -249,7 +249,7 @@ repos:
exclude: ^providers/ssh/docs/connections/ssh.rst$
- id: end-of-file-fixer
name: Make sure that there is an empty line at the end
exclude: ^docs/apache-airflow/img/.*\.dot|^docs/apache-airflow/img/.*\.sha256
exclude: ^docs/apache-airflow/img/.*\.dot|^docs/apache-airflow/img/.*\.sha256|.*/dist/.*|LICENSES-ui.txt
- id: mixed-line-ending
name: Detect if mixed line ending is used (\r vs. \r\n)
- id: check-executables-have-shebangs
Expand Down Expand Up @@ -309,7 +309,7 @@ repos:
The word(s) should be in lowercase." && exec codespell "$@"' --
language: python
types: [text]
exclude: material-icons\.css$|^images/.*$|^RELEASE_NOTES\.txt$|^.*package-lock\.json$|^.*/kinglear\.txt$|^.*pnpm-lock\.yaml$
exclude: material-icons\.css$|^images/.*$|^RELEASE_NOTES\.txt$|^.*package-lock\.json$|^.*/kinglear\.txt$|^.*pnpm-lock\.yaml$|.*/dist/.*
args:
- --ignore-words=docs/spelling_wordlist.txt
- --skip=providers/.*/src/airflow/providers/*/*.rst,providers/*/docs/changelog.rst,airflow/www/*.log,docs/*/commits.rst,providers/*/docs/commits.rst,providers/*/*/docs/commits.rst,docs/apache-airflow/tutorial/pipeline_example.csv,*.min.js,*.lock,INTHEWILD.md
Expand Down Expand Up @@ -381,7 +381,7 @@ repos:
entry: ./scripts/ci/pre_commit/replace_bad_characters.py
language: python
types: [file, text]
exclude: ^clients/gen/go\.sh$|^\.gitmodules$
exclude: ^clients/gen/go\.sh$|^\.gitmodules$|.*/dist/.*
additional_dependencies: ['rich>=12.4.4']
- id: lint-openapi
name: Lint OpenAPI using spectral
Expand Down Expand Up @@ -684,7 +684,8 @@ repos:
^contributing-docs/03_contributors_quick_start.rst$|
^.*\.(png|gif|jp[e]?g|tgz|lock)$|
git|
^newsfragments/43349\.significant\.rst$
^newsfragments/43349\.significant\.rst$|
.*/dist/.*
- id: check-base-operator-partial-arguments
name: Check BaseOperator and partial() arguments
language: python
Expand Down Expand Up @@ -793,7 +794,7 @@ repos:
entry: ./scripts/ci/pre_commit/check_license.py
language: python
files: ^.*LICENSE.*$|^.*LICENCE.*$
exclude: ^providers/.*/src/.*/LICENSE$
exclude: ^providers/.*/src/.*/LICENSE$|.*/dist/.*
pass_filenames: false
- id: check-aiobotocore-optional
name: Check if aiobotocore is an optional dependency only
Expand Down Expand Up @@ -886,6 +887,14 @@ repos:
entry: ./scripts/ci/pre_commit/compile_ui_assets_dev.py
pass_filenames: false
additional_dependencies: ['[email protected]']
- id: compile-fab-assets
name: Compile FAB provider assets
language: node
'types_or': [ javascript, ts, tsx ]
files: ^providers/fab/.*/www/
entry: ./scripts/ci/pre_commit/compile_fab_assets.py
pass_filenames: false
additional_dependencies: [ '[email protected]' ]
- id: compile-www-assets
name: Compile www assets (manual)
language: node
Expand Down
1 change: 1 addition & 0 deletions airflow/dag_processing/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ def _serialize_dag_capturing_errors(
else:
# Check and update DagCode
DagCode.update_source_code(dag.dag_id, dag.fileloc)

return []
except OperationalError:
raise
Expand Down
2 changes: 2 additions & 0 deletions contributing-docs/08_static_code_checks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ require Breeze Docker image to be built locally.
+-----------------------------------------------------------+--------------------------------------------------------+---------+
| codespell | Run codespell | |
+-----------------------------------------------------------+--------------------------------------------------------+---------+
| compile-fab-assets | Compile FAB provider assets | |
+-----------------------------------------------------------+--------------------------------------------------------+---------+
| compile-ui-assets | Compile ui assets (manual) | |
+-----------------------------------------------------------+--------------------------------------------------------+---------+
| compile-ui-assets-dev | Compile ui assets in dev mode (manual) | |
Expand Down
8 changes: 4 additions & 4 deletions dev/breeze/doc/images/output_static-checks.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dev/breeze/doc/images/output_static-checks.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16b7f3c6c23d11208195ebda9a569fe4
c7fbc4eef958e14a7d7fba9a9a101fcd
1 change: 1 addition & 0 deletions dev/breeze/src/airflow_breeze/pre_commit_ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
"check-xml",
"check-zip-file-is-not-committed",
"codespell",
"compile-fab-assets",
"compile-ui-assets",
"compile-ui-assets-dev",
"compile-www-assets",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
Apache Airflow
Copyright 2016-2023 The Apache Software Foundation

This product includes software developed at The Apache Software
Foundation (http://www.apache.org/).

=======================================================================
css-loader|5.2.7:
-----
MIT
Copyright JS Foundation and other contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

webpack-contrib/css-loader


moment|2.30.1:
-----
MIT
Copyright (c) JS Foundation and other contributors

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

https://github.com/moment/moment.git


moment-timezone|0.5.47:
-----
MIT
The MIT License (MIT)

Copyright (c) JS Foundation and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
https://github.com/moment/moment-timezone.git


Loading

0 comments on commit 7323548

Please sign in to comment.