-
Notifications
You must be signed in to change notification settings - Fork 16.9k
feat(docker): add minute-level log retention support to clean-logs.sh #61853
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
Changes from all commits
ea406b5
ff44f1b
b41186b
063cc32
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13727,6 +13727,11 @@ | |
| "type": "integer", | ||
| "default": 15 | ||
| }, | ||
| "retentionMinutes": { | ||
| "description": "Total retention time is retentionDays + retentionMinutes.", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was there a mishap with this commit? ^^ you replaced the description instead of adding :) |
||
| "type": "integer", | ||
| "default": 0 | ||
| }, | ||
| "frequencyMinutes": { | ||
| "description": "Number of minutes between attempts to groom the Airflow logs in log groomer sidecar.", | ||
| "type": "integer", | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Additions in this file also need additions in https://github.com/shreeharshshinde/airflow/blob/main/chart/values.schema.json |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -981,6 +981,11 @@ workers: | |
| # Number of days to retain logs | ||
| retentionDays: 15 | ||
|
|
||
| # Number of minutes to retain logs. | ||
| # This can be used for finer granularity than days. | ||
| # Total retention is retentionDays + retentionMinutes. | ||
| retentionMinutes: 0 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you considered instead of adding another parameter (plus all the complexity with this) to support fractions, e.g.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have thought on that - and scraped the idea immediately :) Usability is too bad imo
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with @n-badtke-cg, I think at the user level is harder to define the retention that way.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also: we need to calculate minutes anyway because the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also an example: 10 minutes. fractional days = 10min / (24hours * 60min) = 0,00694444444444444444444444444444... |
||
|
|
||
| # Frequency to attempt to groom logs (in minutes) | ||
| frequencyMinutes: 15 | ||
|
|
||
|
|
@@ -1361,6 +1366,12 @@ scheduler: | |
| args: ["bash", "/clean-logs"] | ||
| # Number of days to retain logs | ||
| retentionDays: 15 | ||
|
|
||
| # Number of minutes to retain logs. | ||
| # This can be used for finer granularity than days. | ||
| # Total retention is retentionDays + retentionMinutes. | ||
| retentionMinutes: 0 | ||
|
|
||
| # frequency to attempt to groom logs, in minutes | ||
| frequencyMinutes: 15 | ||
| resources: {} | ||
|
|
@@ -2201,6 +2212,12 @@ triggerer: | |
| args: ["bash", "/clean-logs"] | ||
| # Number of days to retain logs | ||
| retentionDays: 15 | ||
|
|
||
| # Number of minutes to retain logs. | ||
| # This can be used for finer granularity than days. | ||
| # Total retention is retentionDays + retentionMinutes. | ||
| retentionMinutes: 0 | ||
|
|
||
| # frequency to attempt to groom logs, in minutes | ||
| frequencyMinutes: 15 | ||
| resources: {} | ||
|
|
@@ -2427,6 +2444,12 @@ dagProcessor: | |
| args: ["bash", "/clean-logs"] | ||
| # Number of days to retain logs | ||
| retentionDays: 15 | ||
|
|
||
| # Number of minutes to retain logs. | ||
| # This can be used for finer granularity than days. | ||
| # Total retention is retentionDays + retentionMinutes. | ||
| retentionMinutes: 0 | ||
|
|
||
| # frequency to attempt to groom logs, in minutes | ||
| frequencyMinutes: 15 | ||
| resources: {} | ||
|
|
||
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.
I thought that the Dockerfile is getting autogenerated with scripts?
https://github.com/apache/airflow/blob/main/Dockerfile#L1634
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.
so should I remove that ?
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.
I don't know, here we need more experienced person to give us the information