-
Notifications
You must be signed in to change notification settings - Fork 16.4k
fix(chart): allow revisionHistoryLimit to be set to 0 #60340
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
fix(chart): allow revisionHistoryLimit to be set to 0 #60340
Conversation
Use explicit nil check instead of truthy check to allow 0 as valid value. Signed-off-by: Angel Freire <cuerty@gmail.com>
|
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)
|
…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>
jscheffl
left a comment
There was a problem hiding this 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!
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
* 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>
Previously, setting
revisionHistoryLimit: 0was silently ignored becausethe templates used a truthy check which evaluates 0 as false.
Changed to explicit nil check via a new
_set_if_not_nilhelper to allow 0 as a valid value.closes: #60339
Was generative AI tooling used to co-author this PR?
Generated-by: Claude following the guidelines
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.