Skip to content

feat(settings): add observability.log_retention_days - #8383

Merged
katrogan merged 2 commits into
mainfrom
katrina/settings-log-retention-days
Nov 13, 2026
Merged

katrogan merged 2 commits into
mainfrom
katrina/settings-log-retention-days

Conversation

@katrogan

Copy link
Copy Markdown
Contributor

Why are the changes needed?

Organizations need to choose how long task logs stay visible, and a server may need to cap that, for example by plan. Settings had no field for it.

What changes were proposed in this pull request?

  • A new ObservabilitySettings group with Int64Setting log_retention_days, added to Settings as observability (field 10). This is the number of days after an attempt ends that its logs stay visible. 0 or unset leaves it to the server, which may also cap how high it can be set.
  • The runs settings service:
    • merges the field like the other scalar settings (the most specific scope wins);
    • rejects a negative value with INVALID_ARGUMENT.
  • Generated Go, Python, Rust and TypeScript code.

The field only declares the setting; this PR doesn't hide or delete any logs. A server decides how to apply it.

How was this patch tested?

  • TestMergeObservabilitySettings: the most specific scope wins, and nothing stored resolves to nil.
  • TestMergeSettingsHandlesEveryField now includes observability.
  • TestValidateLogRetentionDays: nil, unset, 0, positive and negative values.
  • go test ./runs/... passes, and buf lint is clean.

Labels

  • added

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Adds an ObservabilitySettings group with log_retention_days: how many
days after an attempt ends its task logs stay visible. 0 or unset leaves
it to the server, which may also cap how high it can be set.

The runs settings service merges it like the other scalar settings and
rejects a negative value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Katrina Rogan <katroganGH@gmail.com>
@katrogan katrogan added the added Merged changes that add new functionality label Nov 11, 2026
@katrogan
katrogan merged commit 03b136c into main Nov 13, 2026
25 checks passed
@katrogan
katrogan deleted the katrina/settings-log-retention-days branch November 13, 2026 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

added Merged changes that add new functionality flyte2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants