potiuk commented on code in PR #58840:
URL: https://github.com/apache/airflow/pull/58840#discussion_r2572956938
##########
dev/breeze/src/airflow_breeze/utils/selective_checks.py:
##########
@@ -1767,3 +1768,125 @@ def parse_dep(dep_str: str) -> tuple[str, str | None]:
)
return violations
+
+ @cached_property
+ def common_compat_changed_without_next_version(self) -> bool:
+ """
+ Check if common.compat provider changed and other providers changed
don't have '# use next version'
+ comment for their common-compat dependency.
+ """
+ if self._github_event != GithubEvents.PULL_REQUEST:
+ return False
+
+ # First, check if common.compat provider was changed
+ common_compat_changed = False
+ for changed_file in self._files:
+ if changed_file.startswith("providers/common/compat/"):
+ common_compat_changed = True
+ break
+
+ if not common_compat_changed:
+ return False
+
+ # Find only the providers that actually have file changes (not
including related providers)
+ changed_providers: set[str] = set()
+ for changed_file in self._files:
+ provider = find_provider_affected(changed_file, include_docs=False)
+ if provider and provider not in ["common.compat", "Providers"]:
+ changed_providers.add(provider)
+ elif provider == "Providers":
Review Comment:
Not only. This check is only triggered when "common.compat" changed AND
devel-common changed. This would usually mean that maybe we added some common
test code while modifying common.compat.
This is actually part that I added manually after generating most of the
code - because AI also proposed to ignore the case when all providers were
modified. But when I thought about actual use case and historical changes, I
can very easily imagine a significant refactor in the code while also adding
some functionality to common.compat - it's quite normal pattern, and in case we
ignore that case we could have easlly miss all or some providers not updated
with `# use next version`.
--
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]