potiuk commented on code in PR #70499:
URL: https://github.com/apache/airflow/pull/70499#discussion_r3682364283


##########
scripts/in_container/run_provider_yaml_files_check.py:
##########
@@ -489,6 +493,25 @@ def 
check_hook_class_name_entries_in_connection_types(yaml_files: dict[str, dict
     return num_connection_types, num_errors
 
 
+@run_check("Checking that python-modules in retry-policies exist and belong to 
provider package")
+def check_retry_policy_modules_exist_and_belong_to_package(yaml_files: 
dict[str, dict]) -> tuple[int, int]:

Review Comment:
   The comment here is doing important work — retry policies live under 
`policies/retry.py` while every other registry category's modules sit in a 
directory matching the yaml key (`operators/`, `hooks/`, `sensors/`, 
`triggers/`), which is why `parse_module_data`'s glob-based completeness check 
can't be reused and this bespoke check exists.
   
   Not something to change in this PR — the feature already shipped with that 
layout and moving it would be a breaking import path. But it's worth knowing 
that adding a second provider with retry policies will hit the same divergence, 
and the next person adding a registry category may copy this bespoke check 
rather than the standard one without realising why it's different.
   
   A line in the comment saying "unlike other categories, retry policies 
intentionally live under `policies/`" would make the *why* explicit for that 
next reader, rather than just the *what*.
   
   ---
   Drafted-by: Claude Code (Opus 5); reviewed by @potiuk before posting



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to