HIGH: No size limit on deployment logs stored in SQLite #122
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
merge-ready
merge-ready
needs-checks
needs-checks
needs-rebase
needs-rebase
needs-review
needs-review
needs-rework
needs-rework
notplanned
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/upaas#122
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
Deployment logs are accumulated without any size cap in the
logsTEXT column of thedeploymentstable. ThedeploymentLogWriterflushes buffered build output to the database every second viaAppendLog, which concatenates to the existing logs string.A long build (up to the 30-minute
buildTimeout) producing continuous output can generate hundreds of MB in a single row.Impact
logsvalues cause slow queries when loading deployment detailsAppendLogre-writes the entire logs column on every flush (read + concat + write), so performance degrades quadratically with log sizeFiles
internal/models/deployment.go—AppendLog()concatenates without limitinternal/service/deploy/deploy.go—deploymentLogWriterflushes every secondSuggested Fix
Options (not mutually exclusive):
AppendLogat a maximum size (e.g., 1MB) and truncate oldest lines when exceededwriteLogsToFile) and keep only a tail/summary in the DB