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 2021/04/01 10:02:02 UTC

[GitHub] [airflow] uranusjr opened a new pull request #15130: A bunch of template_fields_renderers additions

uranusjr opened a new pull request #15130:
URL: https://github.com/apache/airflow/pull/15130


   See #11177. Mostly SQL fields and Python options. Two notable execeptions:
   
   * `WinRMOperator.command` is marked as `bash` even itโ€™s technically not. cmd.exe and Powershell are close enough for syntax highlighting purposes IMO.
   * A new `jinja` renderer is implemented. The Pygment lexer is called `DjangoLexer`, but [Pygments suggets rendering Jinja2 with it](https://pygments.org/docs/lexers/#pygments.lexers.templates.DjangoLexer).
   
   ---
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   


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

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



[GitHub] [airflow] ashb commented on a change in pull request #15130: A bunch of template_fields_renderers additions

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #15130:
URL: https://github.com/apache/airflow/pull/15130#discussion_r605534187



##########
File path: airflow/providers/microsoft/winrm/operators/winrm.py
##########
@@ -56,6 +56,7 @@ class WinRMOperator(BaseOperator):
     """
 
     template_fields = ('command',)
+    template_fields_renderers = {"command": "bash"}

Review comment:
       Since https://pygments.org/docs/lexers/#pygments.lexers.shell.PowerShellLexer exists should we not use it?




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

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



[GitHub] [airflow] uranusjr commented on a change in pull request #15130: A bunch of template_fields_renderers additions

Posted by GitBox <gi...@apache.org>.
uranusjr commented on a change in pull request #15130:
URL: https://github.com/apache/airflow/pull/15130#discussion_r605535949



##########
File path: airflow/providers/microsoft/winrm/operators/winrm.py
##########
@@ -56,6 +56,7 @@ class WinRMOperator(BaseOperator):
     """
 
     template_fields = ('command',)
+    template_fields_renderers = {"command": "bash"}

Review comment:
       Right, I should have thought of it ๐Ÿ˜… 




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

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



[GitHub] [airflow] github-actions[bot] commented on pull request #15130: A bunch of template_fields_renderers additions

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #15130:
URL: https://github.com/apache/airflow/pull/15130#issuecomment-811835303


   The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest master at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.


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

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



[GitHub] [airflow] kaxil merged pull request #15130: A bunch of template_fields_renderers additions

Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #15130:
URL: https://github.com/apache/airflow/pull/15130


   


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

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