You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/10/13 17:21:11 UTC

[GitHub] [airflow] dstandish opened a new pull request, #27039: No extra prefix required for dataprep hook

dstandish opened a new pull request, #27039:
URL: https://github.com/apache/airflow/pull/27039

   From 2.3 we no longer need this convention for web UI custom fields.  Just cleaning up the codebase to generally not use this pattern.
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] potiuk merged pull request #27039: Allow and prefer non-prefixed extra fields for dataprep hook

Posted by GitBox <gi...@apache.org>.
potiuk merged PR #27039:
URL: https://github.com/apache/airflow/pull/27039


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] ferruzzi commented on a diff in pull request #27039: No extra prefix required for dataprep hook

Posted by GitBox <gi...@apache.org>.
ferruzzi commented on code in PR #27039:
URL: https://github.com/apache/airflow/pull/27039#discussion_r1001044435


##########
airflow/providers/google/cloud/hooks/dataprep.py:
##########
@@ -29,6 +29,20 @@
 from airflow.hooks.base import BaseHook
 
 
+def _get_field(extras: dict, field_name: str):
+    """Get field from extra, first checking short name, then for backcompat we check for prefixed name."""
+    backcompat_prefix = "extra__dataprep__"
+    if field_name.startswith('extra_'):

Review Comment:
   ```suggestion
       backcompat_prefix = "extra__dataprep__"
       if field_name.startswith(backcompat_prefix):
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] ferruzzi commented on a diff in pull request #27039: Allow and prefer non-prefixed extra fields for dataprep hook

Posted by GitBox <gi...@apache.org>.
ferruzzi commented on code in PR #27039:
URL: https://github.com/apache/airflow/pull/27039#discussion_r1003612268


##########
airflow/providers/google/cloud/hooks/dataprep.py:
##########
@@ -29,6 +29,20 @@
 from airflow.hooks.base import BaseHook
 
 
+def _get_field(extras: dict, field_name: str):
+    """Get field from extra, first checking short name, then for backcompat we check for prefixed name."""
+    backcompat_prefix = "extra__dataprep__"
+    if field_name.startswith("extra_"):

Review Comment:
   In some of these PRs you are using "extra_", some use "extra__" (two underscores), and others are using `backcompat_prefix`.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] dstandish commented on a diff in pull request #27039: Allow and prefer non-prefixed extra fields for dataprep hook

Posted by GitBox <gi...@apache.org>.
dstandish commented on code in PR #27039:
URL: https://github.com/apache/airflow/pull/27039#discussion_r1003643271


##########
airflow/providers/google/cloud/hooks/dataprep.py:
##########
@@ -29,6 +29,20 @@
 from airflow.hooks.base import BaseHook
 
 
+def _get_field(extras: dict, field_name: str):
+    """Get field from extra, first checking short name, then for backcompat we check for prefixed name."""
+    backcompat_prefix = "extra__dataprep__"
+    if field_name.startswith("extra_"):

Review Comment:
   No reason just someone suggested adding double underscore and I simply didn't get to all of them... I can do a cleanup pr after all the dust is settled 



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] dstandish commented on a diff in pull request #27039: Allow and prefer non-prefixed extra fields for dataprep hook

Posted by GitBox <gi...@apache.org>.
dstandish commented on code in PR #27039:
URL: https://github.com/apache/airflow/pull/27039#discussion_r1003808451


##########
airflow/providers/google/cloud/hooks/dataprep.py:
##########
@@ -29,6 +29,20 @@
 from airflow.hooks.base import BaseHook
 
 
+def _get_field(extras: dict, field_name: str):
+    """Get field from extra, first checking short name, then for backcompat we check for prefixed name."""
+    backcompat_prefix = "extra__dataprep__"
+    if field_name.startswith("extra_"):

Review Comment:
   ```suggestion
       if field_name.startswith("extra__"):
   ```



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org