[ https://issues.apache.org/jira/browse/AIRFLOW-4833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16948952#comment-16948952 ]
ASF subversion and git services commented on AIRFLOW-4833: ---------------------------------------------------------- Commit ddf0f3050869f011d2da6c6434ea23a83e407402 in airflow's branch refs/heads/v1-10-test from Géraud [ https://gitbox.apache.org/repos/asf?p=airflow.git;h=ddf0f30 ] [AIRFLOW-4833] Allow to set Jinja env options in DAG declaration (#5943) (cherry picked from commit 3d14a51cdb4dee5c96c2397e7df2626a52eec157) > Jinja templating removes newlines > --------------------------------- > > Key: AIRFLOW-4833 > URL: https://issues.apache.org/jira/browse/AIRFLOW-4833 > Project: Apache Airflow > Issue Type: Bug > Components: operators > Affects Versions: 1.10.2 > Reporter: Francesco Macagno > Assignee: Galak > Priority: Minor > Fix For: 1.10.6 > > > When using an operator that has Jinja templating enabled for a field, if the > field value ends with a newline then the newline is removed, regardless of > whether there was a template in the string. > > This came up when attempting to send data to Prometheus pushgateway using the > SimpleHttpOperator. Pushgateway requires a newline at the end of every entry, > so the removal of the newline at the end of the data parameter causes the > request to fail in a way that is difficult to debug. > > This can be gotten around by including a space after the newline character, > though this is not a great solution. The space is ignored by pushgateway. -- This message was sent by Atlassian Jira (v8.3.4#803005)