Re: [PR] Support macros defined via plugins in Airflow 3 [airflow]

2025-05-19 Thread via GitHub


amoghrajesh merged PR #50642:
URL: https://github.com/apache/airflow/pull/50642


-- 
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-unsubscr...@airflow.apache.org

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



Re: [PR] Support macros defined via plugins in Airflow 3 [airflow]

2025-05-19 Thread via GitHub


amoghrajesh commented on code in PR #50642:
URL: https://github.com/apache/airflow/pull/50642#discussion_r2095903578


##
airflow-core/src/airflow/plugins_manager.py:
##
@@ -525,7 +525,7 @@ def integrate_macros_plugins() -> None:
 if plugin.name is None:
 raise AirflowPluginException("Invalid plugin name")
 
-macros_module = make_module(f"airflow.macros.{plugin.name}", 
plugin.macros)
+macros_module = make_module(f"airflow.sdk.macros.{plugin.name}", 
plugin.macros)

Review Comment:
   Will do in a follow up



-- 
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-unsubscr...@airflow.apache.org

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



Re: [PR] Support macros defined via plugins in Airflow 3 [airflow]

2025-05-19 Thread via GitHub


amoghrajesh commented on code in PR #50642:
URL: https://github.com/apache/airflow/pull/50642#discussion_r2095510710


##
airflow-core/docs/administration-and-deployment/plugins.rst:
##
@@ -171,7 +171,7 @@ definitions in Airflow.
 from airflow.providers.amazon.aws.transfers.gcs_to_s3 import 
GCSToS3Operator
 
 
-# Will show up under airflow.macros.test_plugin.plugin_macro
+# Will show up under airflow.sdk.macros.test_plugin.plugin_macro
 # and in templates through {{ macros.test_plugin.plugin_macro }}

Review Comment:
   Cool



##
task-sdk/src/airflow/sdk/__init__.py:
##
@@ -112,6 +114,7 @@
 "task": ".definitions.decorators",
 "task_group": ".definitions.decorators",
 "teardown": ".definitions.decorators",
+"macros": ".definitions.macros",

Review Comment:
   Yeah let me remove that, better handled this way



-- 
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-unsubscr...@airflow.apache.org

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



Re: [PR] Support macros defined via plugins in Airflow 3 [airflow]

2025-05-19 Thread via GitHub


amoghrajesh commented on code in PR #50642:
URL: https://github.com/apache/airflow/pull/50642#discussion_r2095376010


##
airflow-core/src/airflow/plugins_manager.py:
##
@@ -525,7 +525,7 @@ def integrate_macros_plugins() -> None:
 if plugin.name is None:
 raise AirflowPluginException("Invalid plugin name")
 
-macros_module = make_module(f"airflow.macros.{plugin.name}", 
plugin.macros)
+macros_module = make_module(f"airflow.sdk.macros.{plugin.name}", 
plugin.macros)

Review Comment:
   Interesting call. Something worth thinking totally. 
   
   Should we do it as a follow up to this task? Its related but not exactly!



-- 
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-unsubscr...@airflow.apache.org

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