Skip to content

Add minute-level log retention for log groomer | issue #61814#61859

Closed
MiteshSahu wants to merge 2 commits intoapache:mainfrom
MiteshSahu:add-log-retention-minutes
Closed

Add minute-level log retention for log groomer | issue #61814#61859
MiteshSahu wants to merge 2 commits intoapache:mainfrom
MiteshSahu:add-log-retention-minutes

Conversation

@MiteshSahu
Copy link

Description

Add minute-level log retention support for log groomer sidecar containers to enable sub-day log rotation in remote logging scenarios (e.g., OpenTelemetry FileLog Receiver).

Changes:

  • Add AIRFLOW__LOG_RETENTION_MINUTES environment variable (takes precedence over AIRFLOW__LOG_RETENTION_DAYS)
  • Add Helm chart logGroomerSidecar.retentionMinutes configuration option for all deployment types (workers, scheduler, triggerer, dag-processor)
  • Update log cleanup script to use find -mmin when minutes are configured, fallback to -mtime (days) otherwise
  • Add unit and Helm integration tests for new functionality
  • Backward compatible: defaults to days-based retention when minutes not specified

Type of change

  • New feature
  • Bug fix
  • Documentation update
  • Breaking change

Testing

  • Added parameterized unit tests in airflow-core/tests/unit/charts/log_groomer.py
  • Added Helm integration tests in helm-tests/tests/chart_utils/log_groomer.py
  • Verified prek static code checks pass (RST, YAML, license headers)
  • Local validation: Helm template rendering and cleanup script logic confirmed

Related Issue

Closes #61814

@boring-cyborg
Copy link

boring-cyborg bot commented Feb 13, 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 area:dev-tools area:helm-chart Airflow Helm Chart area:production-image Production image improvements and fixes backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch labels Feb 13, 2026
@n-badtke-cg
Copy link
Contributor

duplication with #61853

@potiuk potiuk marked this pull request as draft March 10, 2026 23:38
@potiuk
Copy link
Member

potiuk commented Mar 10, 2026

@MiteshSahu This PR has been converted to draft because it does not yet meet our Pull Request quality criteria.

Issues found:

  • Other failing CI checks: Failing: Airflow CTL tests / airflow-ctl:P3.10 tests. Run prek run --from-ref main locally to reproduce. See static checks docs.

Note: Your branch is 685 commits behind main. Some check failures may be caused by changes in the base branch rather than by your PR. Please rebase your branch and push again to get up-to-date CI results.

What to do next:

  • The comment informs you what you need to do.
  • Fix each issue, then mark the PR as "Ready for review" in the GitHub UI - but only after making sure that all the issues are fixed.
  • Maintainers will then proceed with a normal review.

Converting a PR to draft is not a rejection — it is an invitation to bring the PR up to the project's standards so that maintainer review time is spent productively. If you have questions, feel free to ask on the Airflow Slack.

@n-badtke-cg
Copy link
Contributor

n-badtke-cg commented Mar 12, 2026

This PR is obsolete now since PR #61855 got merged

@jscheffl jscheffl closed this Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools area:helm-chart Airflow Helm Chart area:production-image Production image improvements and fixes backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Container Log Groomer should be configurable with a log retention time <1d - OTEL Collector FileLogReceiver

4 participants