Skip to content

Conversation

@cuerty
Copy link
Contributor

@cuerty cuerty commented Jan 9, 2026

Previously, setting revisionHistoryLimit: 0 was silently ignored because
the templates used a truthy check which evaluates 0 as false.

Changed to explicit nil check via a new _set_if_not_nil helper to allow 0 as a valid value.

closes: #60339

Was generative AI tooling used to co-author this PR?

  • Yes (please specify the tool below)

Generated-by: Claude following the guidelines


Use explicit nil check instead of truthy check to allow 0 as valid value.

Signed-off-by: Angel Freire <cuerty@gmail.com>
@boring-cyborg
Copy link

boring-cyborg bot commented Jan 9, 2026

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@boring-cyborg boring-cyborg bot added the area:helm-chart Airflow Helm Chart label Jan 9, 2026
cuerty and others added 2 commits January 9, 2026 23:47
…onHistoryLimit helper

The previous implementation compared $result with "" using eq, which fails
when $result is assigned an integer value (like 0) because Go templates
don't allow comparing different types.

Fixed by using a boolean $found flag instead of type-unsafe string comparison.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Contributor

@jscheffl jscheffl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@jscheffl jscheffl added this to the Airflow Helm Chart 1.19.0 milestone Jan 10, 2026
@jscheffl jscheffl merged commit 0f4c1dd into apache:main Jan 10, 2026
95 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Jan 10, 2026

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

jason810496 pushed a commit to jason810496/airflow that referenced this pull request Jan 22, 2026
* fix(chart): allow revisionHistoryLimit to be set to 0

Use explicit nil check instead of truthy check to allow 0 as valid value.

Signed-off-by: Angel Freire <cuerty@gmail.com>

* fix(chart): use boolean flag to avoid type comparison error in revisionHistoryLimit helper

The previous implementation compared $result with "" using eq, which fails
when $result is assigned an integer value (like 0) because Go templates
don't allow comparing different types.

Fixed by using a boolean $found flag instead of type-unsafe string comparison.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Signed-off-by: Angel Freire <cuerty@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:helm-chart Airflow Helm Chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

revisionHistoryLimit: 0 is silently ignored due to truthy check in templates

2 participants