-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix plugin macros not being exposed through airflow.macros (#12788)
In order to allow a plugin-provided macro to be used at templating time, it needs to be exposed through the airflow.macros module. * Add cleanup logic to test_registering_plugin_macros This test-case has side-effects in the sense that the symbol table of the airflow.macros module is altered when integrate_macros_plugins() is invoked. This commit adds a finalizer to the test case that ensures that that module is being reloaded completely in order to prevent impact on other tests. * Integrate plugin-provided macros in subprocesses When Airflow is available in a virtual environment, and when this environment runs at least Python 3, then plugin-provided macros should be made available to the Python callable that is being executed in this environment. * Document macros limitation Plugin-provided macros can not be used on Python 2 when using PythonVirtualenvOperator any longer.
- Loading branch information
1 parent
f66a46d
commit 29d7848
Showing
4 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters