Allow Worker Log Groomer Sidecar Without Persistence#65852
Conversation
|
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
|
Previously, the worker log groomer sidecar only rendered when `workers.persistence.enabled` was true (i.e., StatefulSet mode). This prevented using the log groomer on Deployments with emptyDir volumes for logs. This change removes the persistence requirement from the log groomer condition. Now the log groomer renders whenever `logGroomerSidecar.enabled` is true, regardless of the persistence setting. This is useful for deployments that: - Use emptyDir for local logs with remote logging (S3, GCS, etc.) - Want to clean up local log files to prevent ephemeral storage exhaustion - Prefer Deployments over StatefulSets for workers Users who don't want the log groomer can disable it by setting `workers.logGroomerSidecar.enabled: false`. Co-Authored-By: Claude Opus 4.5 <[email protected]>
c7225ba to
201fadd
Compare
jscheffl
left a comment
There was a problem hiding this comment.
For me this perfectly makes sense as also w/o persistence the emptyDir can run full for a long running worker. Limiting log groomer only to persistence... not sure why it had been made like this.
Leaving the PR open for a few days for others to object but for me this looks fine.
|
Note: Backport not needed, would be #65884 |
|
So this PR will also be merged, but to Is there anything I need to do - or the merging will be done by you folks :). |
Nothing needed to be done. Waited now 24h for ther feedback - as no other objection will merge now... |
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Context
Previously, the worker log groomer sidecar only rendered when
workers.persistence.enabledwastrue(i.e., StatefulSet mode). This prevented using the log groomer onDeploymentswithemptyDirvolumes for logs.This change removes the persistence requirement from the log groomer condition. Now the log groomer renders whenever
logGroomerSidecar.enabledistrue, regardless of the persistence setting.This is useful for deployments that:
Users who don't want the log groomer can disable it by setting
workers.logGroomerSidecar.enabled: false.Backward Compatibility
This change may add a new sidecar container to existing worker Deployments. Specifically:
persistence.enabledlogGroomerSidecar.enabledtrue)true)true)falsetruetrue)truetruetruefalsefalsetrue)falsetruefalsefalseImpact: Users with
persistence.enabled: falsewho leftlogGroomerSidecar.enabledor thedefault (
true) will now get the log groomer sidecar. This will cause worker pods to be recreated onupgrade.
Mitigation: Users who don't want the log groomer can explicitly set
workers.logGroomerSidecar.enabled: false.Rationale:
bug—users who enable the log groomer expect it to run. The sidecar is lightweight and helps prevent
ephemeral storage exhaustion.
Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.