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


##########
airflow/providers/common/sql/operators/sql.py:
##########
@@ -51,6 +51,36 @@ def _parse_boolean(val: str) -> str | bool:
     raise ValueError(f"{val!r} is not a boolean-like string value")
 
 
+def _get_failed_checks(checks, col=None):
+    """
+    IMPORTANT!!! Keep it for compatibility with released 8.4.0 version of 
google provider.
+
+    Unfortunately the provider used _get_failed_checks and parse_boolean as 
imports and we should
+    keep those methods to avoid 8.4.0 version from failing.
+    """
+    if col:
+        return [
+            f"Column: {col}\nCheck: {check},\nCheck Values: {check_values}\n"
+            for check, check_values in checks.items()
+            if not check_values["success"]
+        ]
+    return [
+        f"\tCheck: {check},\n\tCheck Values: {check_values}\n"
+        for check, check_values in checks.items()
+        if not check_values["success"]
+    ]
+
+
+def parse_boolean(val: str) -> str | bool:
+    """
+    IMPORTANT!!! Keep it for compatibility with released 8.4.0 version of 
google provider.

Review Comment:
   Another variation. I think we have two different threats that we want to 
handle with single solution but they can be done separately - tactical problem 
of blocking immediate threat - our users getting hit by unexpected bigquery 
problem and strategic problem of long term deprecated code removal. 
   
   Both problems can be solved by two paralell threads - there is no need to 
solve both at once.
   
   I propose:
   
   * we release 1.3.1 common.sql now (tomorrow) with my fix (tactical solution)
   * you prepare google 8.4.1 release with "proper" usage of common.sql (rtght 
after)  - branch created from 8.4.0 tag - happy to guide you and review
   * once released 8.4.1 we agree a suitable condition on when the code is 
removed and we update it in main. I would love to hear some good criteria for 
that proposed by you
   * once the condition is fulfilled, we remove the re-added code (strategic 
solution).
   
   I think that solves both problems independently. Tactical can be done now, 
strategic can be dofferred and applied later as next step.
   
   We also start sharing more and more release management of providers (which 
is also my goal).
   
   WDYT @eladkal ? 



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