Add provider class registration checks to provider.yaml validation#64127
Open
potiuk wants to merge 2 commits intoapache:mainfrom
Open
Add provider class registration checks to provider.yaml validation#64127potiuk wants to merge 2 commits intoapache:mainfrom
potiuk wants to merge 2 commits intoapache:mainfrom
Conversation
Add two new checks to run_provider_yaml_files_check.py: 1. Check that hook classes defining conn_type are registered in connection-types — catches hooks with unique conn_type values that are not listed in provider.yaml (async variants sharing conn_type with a registered sync hook are allowed). 2. Check that all provider Hook/Operator/Sensor/Trigger/Executor/Notifier classes are registered in provider.yaml — walks all provider source files, imports them, and verifies every concrete subclass of base types has its module (or class path for executors/notifications) registered in the appropriate section. Also register the missing LocalKubernetesExecutor in the cncf.kubernetes provider.yaml, which was found by the new check.
842c744 to
8f514ae
Compare
vincbeck
approved these changes
Mar 24, 2026
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
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.
Add two new checks to
run_provider_yaml_files_check.pythat verify provider classesare properly registered in
provider.yaml, closing the gap where existing checks onlyvalidated yaml→code (classes listed in YAML exist) but not code→yaml (classes in code
are listed).
New checks
1. Hook conn_type registration check
BaseHooksubclasses that defineconn_typedirectlyconnection-typesconn_typewith an already-registered sync hook are allowed2. Comprehensive class registration check
BaseHook,BaseOperator,BaseSensorOperator,BaseTrigger,BaseExecutor,BaseNotifiersend_*_notification = FooNotifier) viaid()dedup__init__.pyre-exports for executorstests/,example_dags/,decorators/directoriesVerified: 1,571 classes across all providers (936 operators, 307 hooks,
155 triggers, 152 sensors, 13 notifiers, 8 executors).
Also registers the missing
LocalKubernetesExecutorin thecncf.kubernetesprovider, found by the new check.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Claude Opus 4.6) following the guidelines