airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kaxil Naik (Jira)" <>
Subject [jira] [Resolved] (AIRFLOW-4833) Jinja templating removes newlines
Date Thu, 29 Aug 2019 19:07:00 GMT


Kaxil Naik resolved AIRFLOW-4833.
    Fix Version/s: 1.10.6
       Resolution: Fixed

> Jinja templating removes newlines
> ---------------------------------
>                 Key: AIRFLOW-4833
>                 URL:
>             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

View raw message