Skip to content

Helm Chart logGroomerSidecar retentionDays (and retentionMinutes) set to the number 0 are getting ignored #66011

Description

@n-badtke-cg

Under which category would you file this issue?

Helm chart

Apache Airflow version

3.2.1

What happened and how to reproduce it?

I configured the logGroomer with:

retentionDays: 0
retentionMinutes: 60

But the log grommer only gets the ENV AIRFLOW__LOG_RETENTION_MINUTES=60; AIRFLOW__LOG_RETENTION_DAYS is unset.

What you think should happen instead?

The value of numeric 0 should be propagated.

Operating System

Debian GNU/Linux 12 (bookworm)

Deployment

Official Apache Airflow Helm Chart

Apache Airflow Provider(s)

No response

Versions of Apache Airflow Providers

irrelevant

Official Helm Chart version

1.21.0 (latest released)

Kubernetes Version

1.33

Helm Chart configuration

workers:
  celery:
    logGroomerSidecar:
      retentionDays: 0
      retentionMinutes: 60
triggerer:
  logGroomerSidecar:
    retentionDays: 0
    retentionMinutes: 60

Docker Image customizations

not applicable

Anything else?

The reason for this behavior is due to how go-template handles if statements:

{{ if .Values.triggerer.logGroomerSidecar.retentionDays }}
# false if the value is empty. The empty values are boolean false, numeric 0, any nil pointer or interface value, and any array, slice, map, or string of length zero. See https://pkg.go.dev/text/template#hdr-Actions
# This means if .Values.triggerer.logGroomerSidecar.retentionDays is set to numeric 0, the if statement resolves in false.
{{ end }}

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:helm-chartAirflow Helm Chartkind:bugThis is a clearly a bugpriority:mediumBug that should be fixed before next release but would not block a release

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions