You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2022/06/30 16:23:44 UTC
[airflow] branch add-better-dependencies-diagnostics updated (9663bcbc31 -> a943509ee6)
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a change to branch add-better-dependencies-diagnostics
in repository https://gitbox.apache.org/repos/asf/airflow.git
discard 9663bcbc31 Better diagnostics in case someone modified the dependencies file
omit 6349b5e578 Move provider dependencies to inside provider folders
add 41aa9ab0e1 Upgrade more javascript files to typescript (#24715)
add 0de31bd73a Move provider dependencies to inside provider folders (#24672)
add d725625799 Fix grid date ticks (#24738)
add 7e6c9387d8 Use LTS version of node for pre-commit checks (#24688)
add 737e2f5141 Update command from breeze to command (#24741)
add 9d307102b4 More typing and minor refactor for kubernetes (#24719)
add 206e6400c1 Remove defaults from Airflow test config (#24263)
add a7d04cf037 (GitHub CI) update most CI workflows (stale, build-images, etc) (#24705)
add fab2913d1a Fix purge_inactive_dag_warnings filter (#24749)
new a943509ee6 Better diagnostics in case someone modified the dependencies file
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (9663bcbc31)
\
N -- N -- N refs/heads/add-better-dependencies-diagnostics (a943509ee6)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/build-images.yml | 20 +--
.github/workflows/ci.yml | 168 ++++++++++-----------
.github/workflows/codeql-analysis.yml | 12 +-
.github/workflows/release_dockerhub_image.yml | 8 +-
.github/workflows/stale.yml | 2 +-
.pre-commit-config.yaml | 1 +
BREEZE.rst | 2 +-
airflow/config_templates/default_test.cfg | 65 --------
airflow/kubernetes/pod_generator.py | 2 +-
airflow/models/dagwarning.py | 18 +--
.../providers/cncf/kubernetes/hooks/kubernetes.py | 17 +--
.../cncf/kubernetes/operators/kubernetes_pod.py | 24 +--
.../js/grid/{AutoRefresh.jsx => AutoRefresh.tsx} | 2 +-
.../js/grid/{ResetRoot.jsx => ResetRoot.tsx} | 0
.../js/grid/{ToggleGroups.jsx => ToggleGroups.tsx} | 19 ++-
.../{Clipboard.test.jsx => Clipboard.test.tsx} | 0
.../components/{Clipboard.jsx => Clipboard.tsx} | 6 +-
.../{LinkButton.test.jsx => LinkButton.test.tsx} | 0
.../components/{LinkButton.jsx => LinkButton.tsx} | 8 +-
.../{TaskName.test.jsx => TaskName.test.tsx} | 6 +-
.../grid/components/{TaskName.jsx => TaskName.tsx} | 11 +-
.../context/{autorefresh.jsx => autorefresh.tsx} | 22 ++-
airflow/www/static/js/grid/dagRuns/Bar.tsx | 6 +-
.../js/grid/dagRuns/{Tooltip.jsx => Tooltip.tsx} | 7 +-
.../dagRuns/{index.test.jsx => index.test.tsx} | 116 ++++++++------
.../{ConfirmDialog.jsx => ConfirmDialog.tsx} | 14 +-
.../content/dagRun/{index.jsx => index.tsx} | 7 +-
.../taskInstance/{Details.jsx => Details.tsx} | 20 ++-
.../{ExtraLinks.jsx => ExtraLinks.tsx} | 12 +-
.../content/taskInstance/{Nav.jsx => Nav.tsx} | 27 +++-
.../js/grid/details/content/taskInstance/index.tsx | 3 +-
airflow/www/static/js/grid/renderTaskRows.tsx | 2 +-
tests/core/test_config_templates.py | 6 -
.../cncf/kubernetes/hooks/test_kubernetes.py | 6 +-
tests/utils/test_email.py | 8 +-
35 files changed, 346 insertions(+), 301 deletions(-)
rename airflow/www/static/js/grid/{AutoRefresh.jsx => AutoRefresh.tsx} (97%)
rename airflow/www/static/js/grid/{ResetRoot.jsx => ResetRoot.tsx} (100%)
rename airflow/www/static/js/grid/{ToggleGroups.jsx => ToggleGroups.tsx} (81%)
rename airflow/www/static/js/grid/components/{Clipboard.test.jsx => Clipboard.test.tsx} (100%)
rename airflow/www/static/js/grid/components/{Clipboard.jsx => Clipboard.tsx} (95%)
rename airflow/www/static/js/grid/components/{LinkButton.test.jsx => LinkButton.test.tsx} (100%)
rename airflow/www/static/js/grid/components/{LinkButton.jsx => LinkButton.tsx} (79%)
rename airflow/www/static/js/grid/components/{TaskName.test.jsx => TaskName.test.tsx} (86%)
rename airflow/www/static/js/grid/components/{TaskName.jsx => TaskName.tsx} (91%)
rename airflow/www/static/js/grid/context/{autorefresh.jsx => autorefresh.tsx} (87%)
rename airflow/www/static/js/grid/dagRuns/{Tooltip.jsx => Tooltip.tsx} (93%)
rename airflow/www/static/js/grid/dagRuns/{index.test.jsx => index.test.tsx} (54%)
rename airflow/www/static/js/grid/details/content/{ConfirmDialog.jsx => ConfirmDialog.tsx} (90%)
rename airflow/www/static/js/grid/details/content/dagRun/{index.jsx => index.tsx} (96%)
rename airflow/www/static/js/grid/details/content/taskInstance/{Details.jsx => Details.tsx} (87%)
rename airflow/www/static/js/grid/details/content/taskInstance/{ExtraLinks.jsx => ExtraLinks.tsx} (87%)
rename airflow/www/static/js/grid/details/content/taskInstance/{Nav.jsx => Nav.tsx} (86%)
[airflow] 01/01: Better diagnostics in case someone modified the dependencies file
Posted by po...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch add-better-dependencies-diagnostics
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit a943509ee6524295e2f478e19aea98edfa423a6c
Author: Jarek Potiuk <ja...@polidea.com>
AuthorDate: Thu Jun 30 18:10:05 2022 +0200
Better diagnostics in case someone modified the dependencies file
The "provider_dependencies.json" file gets automatically generated
by pre-commit and in case it cannot be json-parsed, it will break
building the CI image. This is a bit chicken-egg because on
CI the image is needed to run pre-commits that could warn the
user this is the case (and the image fails build with a bit
cryptic message).
This PR improves the diagnostics:
* it runs the pre-commit check before image building which will
fix the generated file (and will let the build run - only to
fail at the latest static-checks step
* it prints warning to the user seeing pre-commit error to not
modify the file manually but let pre-commit do the job.
---
.github/workflows/build-images.yml | 4 ++++
.github/workflows/ci.yml | 6 ++++++
scripts/ci/pre_commit/pre_commit_build_providers_dependencies.py | 4 ++++
3 files changed, 14 insertions(+)
diff --git a/.github/workflows/build-images.yml b/.github/workflows/build-images.yml
index 8903d87da3..a79640667a 100644
--- a/.github/workflows/build-images.yml
+++ b/.github/workflows/build-images.yml
@@ -224,6 +224,8 @@ jobs:
- run: ./scripts/ci/install_breeze.sh
- name: "Free space"
run: breeze free-space
+ - name: "Regenerate dependencies in case they was modified manually so that we can build an image"
+ run: breeze static-checks --type update-providers-dependencies --all-files || true
- name: >
Build & Push AMD64 CI images ${{ env.IMAGE_TAG_FOR_THE_BUILD }}
${{ needs.build-info.outputs.allPythonVersionsListAsString }}
@@ -316,6 +318,8 @@ jobs:
- run: ./scripts/ci/install_breeze.sh
- name: "Free space"
run: breeze free-space
+ - name: "Regenerate dependencies in case they was modified manually so that we can build an image"
+ run: breeze static-checks --type update-providers-dependencies --all-files || true
- name: >
Pull CI image for PROD build:
${{ needs.build-info.outputs.defaultPythonVersion }}:${{ env.IMAGE_TAG_FOR_THE_BUILD }}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 768e3ad15d..4ebd3370d1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -332,6 +332,9 @@ jobs:
- name: "Free space"
run: breeze free-space
if: needs.build-info.outputs.inWorkflowBuild == 'true'
+ - name: "Regenerate dependencies in case they was modified manually so that we can build an image"
+ run: breeze static-checks --type update-providers-dependencies --all-files || true
+ if: needs.build-info.outputs.inWorkflowBuild == 'true'
- name: >
Build & Push CI images ${{ env.IMAGE_TAG_FOR_THE_BUILD }}
${{ needs.build-info.outputs.allPythonVersionsListAsString }}
@@ -402,6 +405,9 @@ jobs:
- name: "Free space"
run: breeze free-space
if: needs.build-info.outputs.inWorkflowBuild == 'true'
+ - name: "Regenerate dependencies in case they was modified manually so that we can build an image"
+ run: breeze static-checks --type update-providers-dependencies --all-files || true
+ if: needs.build-info.outputs.inWorkflowBuild == 'true'
- name: >
Pull CI image for PROD build:
${{ needs.build-info.outputs.defaultPythonVersion }}:${{ env.IMAGE_TAG_FOR_THE_BUILD }}"
diff --git a/scripts/ci/pre_commit/pre_commit_build_providers_dependencies.py b/scripts/ci/pre_commit/pre_commit_build_providers_dependencies.py
index af2471ad62..8ee81908f4 100755
--- a/scripts/ci/pre_commit/pre_commit_build_providers_dependencies.py
+++ b/scripts/ci/pre_commit/pre_commit_build_providers_dependencies.py
@@ -195,6 +195,10 @@ if __name__ == '__main__':
console.print()
sys.exit(1)
DEPENDENCIES_JSON_FILE_PATH.write_text(json.dumps(unique_sorted_dependencies, indent=2) + "\n")
+ console.print(
+ f"[yellow]If you see changes to the {DEPENDENCIES_JSON_FILE_PATH} file - "
+ f"do not modify the file manually. Let pre-commit do the job!"
+ )
console.print()
console.print("[green]Verification complete! Success!\n")
console.print(f"Written {DEPENDENCIES_JSON_FILE_PATH}")