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 2020/04/28 11:44:06 UTC

[GitHub] [airflow] oripwk opened a new issue #8603: Consider supporting .jinja2 extensions across the project

oripwk opened a new issue #8603:
URL: https://github.com/apache/airflow/issues/8603


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the following questions.
   Don't worry if they're not all applicable; just try to include what you can :-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   **Description**
   
   <!-- A short description of your feature -->
   At the moment, various operators support reading templates from given filenames (for example, [bash_command](https://airflow.apache.org/docs/stable/_api/airflow/operators/bash_operator/index.html#airflow.operators.bash_operator.BashOperator) of `BashOperator`). However, all of these operators specify extensions such as `.sh`, .`json` etc., so it means users need to write Jinja2 templates inside `.sh`, `.json` files. A better way to do it would be supporting the `.jinja2` extension.
   
   **Use case / motivation**
   
   The motivation is threefold:
   1. `.jinja2` extension is a widespread convention which is supported by various editors, including Github itself, PyCharm and [VSCode](https://marketplace.visualstudio.com/items?itemName=samuelcolvin.jinjahtml).
   1. Putting templates inside `.jinja2` can help distinguish between regular files and template files just by looking at the directory contents
   1. Working with tools that recognize `.jinja2` templates can help reduce errors while authoring templates.
   
   <!-- What do you want to happen?
   
   Rather than telling us how you might implement this solution, try to take a
   step back and describe what you are trying to achieve.
   
   -->
   
   **Related Issues**
   
   <!-- Is there currently another issue associated with this? -->
   https://github.com/apache/airflow/pull/8572#discussion_r416473395


----------------------------------------------------------------
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] oripwk commented on issue #8603: Consider supporting .jinja2 extensions across the project

Posted by GitBox <gi...@apache.org>.
oripwk commented on issue #8603:
URL: https://github.com/apache/airflow/issues/8603#issuecomment-620577493


   Hi,
   
   Yes, I can work on it. You can assign


----------------------------------------------------------------
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] eladkal commented on issue #8603: Consider supporting .jinja2 extensions across the project

Posted by GitBox <gi...@apache.org>.
eladkal commented on issue #8603:
URL: https://github.com/apache/airflow/issues/8603#issuecomment-832782216


   @kaxil this issue should be resolved by https://github.com/apache/airflow/pull/14603 correct?


-- 
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] boring-cyborg[bot] commented on issue #8603: Consider supporting .jinja2 extensions across the project

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #8603:
URL: https://github.com/apache/airflow/issues/8603#issuecomment-620554427


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


----------------------------------------------------------------
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] mik-laj edited a comment on issue #8603: Consider supporting .jinja2 extensions across the project

Posted by GitBox <gi...@apache.org>.
mik-laj edited a comment on issue #8603:
URL: https://github.com/apache/airflow/issues/8603#issuecomment-620573531


   Hi. 
   
   It looks good. I think we can accept jinja2 whenever template ext is not empty.
   Do you want to work on it? Should I assign you to this ticket?
   
   Best regards,
   Kamil
   


----------------------------------------------------------------
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] mik-laj commented on issue #8603: Consider supporting .jinja2 extensions across the project

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #8603:
URL: https://github.com/apache/airflow/issues/8603#issuecomment-620573531


   Hi. 
   
   It looks good. I think we can accept jinja2 whenever template ext is not empty.
   Do you want to work on it? Should I assign you to this ticket?
   
   Best regards,
   Kaamil
   


----------------------------------------------------------------
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 commented on issue #8603: Consider supporting .jinja2 extensions across the project

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #8603:
URL: https://github.com/apache/airflow/issues/8603#issuecomment-833467762


   > @kaxil this issue should be resolved by #14603 correct?
   
   No, actually this is a bit different i.e. the OP wants to allow using "file.jinja2" instead of "file.bash" or "file.sql" in rendered template fields.


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