Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration option "max_templated_field_length" does not work on the rendered template content #40045

Closed
1 of 2 tasks
Pad71 opened this issue Jun 4, 2024 · 3 comments
Closed
1 of 2 tasks
Labels
area:UI Related to UI/UX. For Frontend Developers. kind:bug This is a clearly a bug

Comments

@Pad71
Copy link

Pad71 commented Jun 4, 2024

Apache Airflow version

2.9.1

If "Other Airflow 2 version" selected, which one?

No response

What happened?

The templated attribute contains a rather long SQL statement (20 000 B). It was displayed incorrectly both in the "Task Instance Detail" and in the "Rendered Template" section (the SQL statement was truncated).

I set the max_templated_field_length configuration parameter to 32000.

After that, the templated attribute was displayed fine in the "Task Instance Detail" section, but in the "Rendered Template" section it was still displayed incorrectly (see the pict)

Task Instance Detail section
image

Rendered Template section
image

What you think should happen instead?

Templated attribute for a given configuration should also appear correctly in the Rendered Template section.

I would also like to ask if the "Rendered Template" link could return to where it was before version 2.9.0. That is, as a subitem of the Details tab (at the same level as the links to Task Instance Details and List All Instances.

The Rendered template section is very frequently used (our Tasks contain mostly SQL) and the current settings since version 2.9.0 make it very difficult to use

How to reproduce

Use long data (longer than max_templated_field_length settings) in the templated attribute and display it.

Operating System

Linux

Versions of Apache Airflow Providers

No response

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@Pad71 Pad71 added area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Jun 4, 2024
@shahar1 shahar1 added area:UI Related to UI/UX. For Frontend Developers. and removed area:core needs-triage label for new issues that we didn't triage yet labels Jun 4, 2024
@SamWheating
Copy link
Contributor

I was unable to replicate this on main. A few theories which might explain the issues here:

  • You will need to update the max_templated_field_length setting on your executors in order for it to take effect. Setting it on only the webserver won't change anything since the rendered fields are saved at execution time in the RTIF table.

  • Changing this setting will not un-truncate the rendered templates for tasks which already ran, since the templates are only rendered once (at execution time), so only tasks run after the setting has been changed will reflect the larger value of max_templated_field_length.

Do either of these explain the issues you've been seeing?

@Pad71
Copy link
Author

Pad71 commented Jun 6, 2024

@SamWheating Thank you very much, Sam, the problem was the the second point. What confused me was that the "truncated" data in the Task Instance Details section displayed correctly immediately after changing the max_templated_field_length.

@Pad71 Pad71 closed this as completed Jun 6, 2024
@Pad71
Copy link
Author

Pad71 commented Jun 6, 2024

not an error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:UI Related to UI/UX. For Frontend Developers. kind:bug This is a clearly a bug
Projects
None yet
Development

No branches or pull requests

3 participants