potiuk commented on a change in pull request #12082:
URL: https://github.com/apache/airflow/pull/12082#discussion_r518892124
##########
File path: .pre-commit-config.yaml
##########
@@ -438,6 +438,17 @@ repos:
files: ^airflow/www/.*\.(css|scss|sass)$
# Keep dependency versions in sync w/ airflow/www/package.json
additional_dependencies: ['[email protected]',
'[email protected]']
+ - id: version-sync
+ name: Version sync
+ files: ^airflow/version.py$|setup.py
+ entry: ./scripts/ci/pre_commit/pre_commit_sync_version.sh
+ language: system
+ - id: providers-init-file
+ name: Provider init file
+ pass_filenames: false
+ always_run: false
+ entry: ./scripts/ci/pre_commit/pre_commit_check_providers_init.sh
+ language: system
Review comment:
Actually this is what I did initially but It will not help.
It's not the "committing" that is a problem but the fact that the
__init__.py remains generated accidentally breaks a lot of flows. If you happen
to generate the docs and press ctrl-c, and then build packages or try to
import them etc. , the errors are really strange and it's difficult to debug. I
found that people who use pre-commit will actually benefit from it because it
will tell them that there is a problem - usually, you commit stuff when things
go highwire to switch to another branch etc. quite often, so I figured this
might be much better - especially that it also cleans up automatically.
Don't you think this makes sense? I think it's the "clearing the path"
approach that I think is the best to follow.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]