-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Add pre-commit check for default configuration #46622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Lee-W
merged 5 commits into
apache:main
from
jason810496:ci/add-pre-commit-check-for-default-configuration
Feb 17, 2025
Merged
Add pre-commit check for default configuration #46622
Lee-W
merged 5 commits into
apache:main
from
jason810496:ci/add-pre-commit-check-for-default-configuration
Feb 17, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18c2442 to
21d4972
Compare
Lee-W
reviewed
Feb 13, 2025
Member
Lee-W
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly good
21d4972 to
e53bad4
Compare
Lee-W
approved these changes
Feb 17, 2025
potiuk
added a commit
to potiuk/airflow
that referenced
this pull request
Feb 17, 2025
The check-default-configuration pre-commit added in apache#46622 is slow and it's not necessary to be run always - only when configuration definition changes. Also it does not really take any files from changed PR as input, so it should be configured to not pass the files to it and to not run parallel instances - because when run with `--all-files` it will run as many parallel copies of it as many processors you have and they will essentially run the same check. Also this pre-commit requires breeze image to be present so it should be addded at the end of pre-commit files, so that is not run when breeze image is not built. All this behaviours have been fixed in this PR. After this change: * only one copy of the check is run when this pre-commit runs * in local pre-commit will only be run if config.yml changes * in canary runs it will always run (with --all-files) * it is marked as "breeze image" tests by placing it at the end of pre-commit configuration file
potiuk
added a commit
that referenced
this pull request
Feb 17, 2025
The check-default-configuration pre-commit added in #46622 is slow and it's not necessary to be run always - only when configuration definition changes. Also it does not really take any files from changed PR as input, so it should be configured to not pass the files to it and to not run parallel instances - because when run with `--all-files` it will run as many parallel copies of it as many processors you have and they will essentially run the same check. Also this pre-commit requires breeze image to be present so it should be addded at the end of pre-commit files, so that is not run when breeze image is not built. All this behaviours have been fixed in this PR. After this change: * only one copy of the check is run when this pre-commit runs * in local pre-commit will only be run if config.yml changes * in canary runs it will always run (with --all-files) * it is marked as "breeze image" tests by placing it at the end of pre-commit configuration file
dantonbertuol
pushed a commit
to dantonbertuol/airflow
that referenced
this pull request
Feb 17, 2025
* Add pre-commit check for default configuration * Refactor: lint from default config list with tempdir * Move check_default_configuration to in_container * Fix nits * Remane cmd as list_default_config_cmd, lint_config_cmd
dantonbertuol
pushed a commit
to dantonbertuol/airflow
that referenced
this pull request
Feb 17, 2025
The check-default-configuration pre-commit added in apache#46622 is slow and it's not necessary to be run always - only when configuration definition changes. Also it does not really take any files from changed PR as input, so it should be configured to not pass the files to it and to not run parallel instances - because when run with `--all-files` it will run as many parallel copies of it as many processors you have and they will essentially run the same check. Also this pre-commit requires breeze image to be present so it should be addded at the end of pre-commit files, so that is not run when breeze image is not built. All this behaviours have been fixed in this PR. After this change: * only one copy of the check is run when this pre-commit runs * in local pre-commit will only be run if config.yml changes * in canary runs it will always run (with --all-files) * it is marked as "breeze image" tests by placing it at the end of pre-commit configuration file
ntr
pushed a commit
to ntr/airflow
that referenced
this pull request
Feb 20, 2025
* Add pre-commit check for default configuration * Refactor: lint from default config list with tempdir * Move check_default_configuration to in_container * Fix nits * Remane cmd as list_default_config_cmd, lint_config_cmd
ntr
pushed a commit
to ntr/airflow
that referenced
this pull request
Feb 20, 2025
The check-default-configuration pre-commit added in apache#46622 is slow and it's not necessary to be run always - only when configuration definition changes. Also it does not really take any files from changed PR as input, so it should be configured to not pass the files to it and to not run parallel instances - because when run with `--all-files` it will run as many parallel copies of it as many processors you have and they will essentially run the same check. Also this pre-commit requires breeze image to be present so it should be addded at the end of pre-commit files, so that is not run when breeze image is not built. All this behaviours have been fixed in this PR. After this change: * only one copy of the check is run when this pre-commit runs * in local pre-commit will only be run if config.yml changes * in canary runs it will always run (with --all-files) * it is marked as "breeze image" tests by placing it at the end of pre-commit configuration file
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on: #46544
related: #46517
related discussion: #46544 (comment)
Why
In the
3.0.0a1release, some configurations have not yet been migrated or deprecated in the default configuration.How
To prevent this from happening, add a pre-commit hook with
airflow config lint.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.