Skip to content

Conversation

@reginaldl
Copy link

Introduce a new configuration parameter, retained_event_logs.
The parameter allows users to control the number of event logs retained on disk, replacing the previously hard-coded value of 12.
This change provides greater flexibility for users who need to retain more logs locally when Buck2 logs to disk.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 23, 2025
@facebook-github-bot
Copy link
Contributor

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this in D83103192. (Because this pull request was imported automatically, there will not be any future comments.)

if let Ok(logfiles) = get_files_in_log_dir(logdir) {
futures::stream::iter(logfiles.into_iter().rev().skip(N_LOGS_RETAINED - 1))
futures::stream::iter(logfiles.into_iter().rev().skip(retained_event_logs))
.then(|file| async move {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed that this went from N -1 to N. Is this correct?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe having a unit test for this would be helpful to verify that this is actually correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants