-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Add pre-commit hook to validate provider spec #33608
Conversation
The `provider.yaml` for `airflow.providers.apache.pinot` provider was referencing a non-existing hook class of `PinotHook`, causing a warning during `providers_manager`'s sanity check. This corrects it to list both hooks of this provider.
5497c73
to
63c6f61
Compare
Also fix errors found by the new check.
63c6f61
to
5389595
Compare
Hmm ... we already have Basically what it does is that it runs
So I'd say either the check should be added there, or maybe some of the existing check should be improved there. |
Or if you prefer to reimplement the checks in a simpler way - maybe - then it's worth to replace the other checks with new ones. BTW. The thing why it uses breeze is that it provides the consistent set of libraries and system level packages and imports that are always the same for everyone - so you can consistently run all kinds of imports and they are guaranteed to work as breeze has all the dependencies installed already. |
I wonder if that existing hook already covers the same topics but is not currently triggered correctly. |
It should be triggred - especially that we are running it with |
But we don’t run it with |
We do. All the runs in CI are alwas with https://github.com/apache/airflow/blob/main/.github/workflows/ci.yml#L537 |
The problem is that we do not check deprecation warnigs there. Both
were importable with deprecation warning - for backwards compatibility - but in the checks we have we have not checkded if deprecation warnings are raised for them. |
And we missed notifier checks in there. |
Improve provider verification script here: #33640 There were quite a few other errors detected by checking Deprecated warnings. |
Closing in favour of series of fixes:
Finally to be completed with improved verrification in |
The Slack Notification listed in provider.yaml for slack has been still using the deprecated version of it. Since the provider verification of ours did not check neither notifications nor warnings, it was not found before. Found in the attempt of adding new verification in apache#33608 then also detected by apache#33640 that improved existing verification.
…33643) The Slack Notification listed in provider.yaml for slack has been still using the deprecated version of it. Since the provider verification of ours did not check neither notifications nor warnings, it was not found before. Found in the attempt of adding new verification in #33608 then also detected by #33640 that improved existing verification.
Inspired by #33601. This adds a pre-commit hook to ensure the
provider.yaml
specifications are valid when its surrounding provider changes. Two errors are found and fixed.Since this obviously also needs to change the Pinot provider, this will unfortunately cause merge conflicts when either this or the other PR is merged. We’ll just need to resolve it when it happens.