Skip to content

Conversation

@mafredri
Copy link
Member

@mafredri mafredri commented Dec 2, 2025

Previously setting AI Bridge retention to 0 would cause records to be
deleted immediately since we didn't check for the zero value before
calculating the deletion threshold.

This adds a check for aibridgeRetention > 0 to skip deletion when
retention is disabled, matching the pattern used for other retention
settings (connection logs, audit logs, etc.).

Also fixes the return type of DeleteOldAIBridgeRecords from int32 to
int64 since COUNT(*) returns bigint in PostgreSQL.

Refs #21055

@mafredri
Copy link
Member Author

mafredri commented Dec 2, 2025

For reviewer: I suggest hiding whitespace changes to view the test refactor.

Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

LGTM, thanks a lot!

Previously setting AI Bridge retention to 0 would cause records to be
deleted immediately since we didn't check for the zero value before
calculating the deletion threshold.

This adds a check for aibridgeRetention > 0 to skip deletion when
retention is disabled, matching the pattern used for other retention
settings (connection logs, audit logs, etc.).

Also fixes the return type of DeleteOldAIBridgeRecords from int32 to
int64 since COUNT(*) returns bigint in PostgreSQL.

Refs #21055
@mafredri mafredri force-pushed the mafredri/feat-allow-disable-aibridge-purge branch from 97374cc to 5e15923 Compare December 3, 2025 09:27
@mafredri mafredri enabled auto-merge (squash) December 3, 2025 09:36
@mafredri mafredri merged commit ad93262 into main Dec 3, 2025
30 checks passed
@mafredri mafredri deleted the mafredri/feat-allow-disable-aibridge-purge branch December 3, 2025 09:37
@github-actions github-actions bot locked and limited conversation to collaborators Dec 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants