next is red: queue_depth.go calls (*gorm.DB).Scan, tripping the scan guard
#235
Reference in New Issue
Block a user
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?
nextataba02bcfailsmake test. Not caused by any open PR — two changes that each passed on their own base collided onnext.Reproduced on a pristine detached checkout of
origin/nextwith no branch merged in, and again in a cache-defeateddocker build --no-cache-filter=builder. Every other package passes; this is the only failing one.internal/gormlog/scan_guard_test.goforbids(*gorm.DB).Scanin non-test code, becauseScanswaps GORM's own trace recorder in for the logging adapter and that recorder does not implementgorm.ParamsFilter, so the statement is logged with its bound values interpolated. Both call sites ininternal/delivery/queue_depth.goare real instances::109—e.database.DB().Model(&database.Target{}).Select("id", "type").Scan(&rows):161— the queued-delivery count, whoseWhere("status IN ?", ...)binds valuesThe guard's own message names the fix:
Find,Pluck, orRaw(...).Row().Scan.:109selects two columns into a struct slice, soFindfits;:161aggregates, soRaw(...).Rows()or aPluckis the shape.The bound values here are delivery statuses rather than secrets, so the disclosure is minor; the breakage is that
nextdoes not build, which blocks the milestone.Found while running the gate for #223, which does not touch either file.
Duplicate of #234, filed a few minutes earlier for the same failure. Two workers hit the red
nextindependently and both filed rather than assuming it was known — the right instinct, and cheap compared to the alternative.The fix is dispatched against #234. Closing this one; no work is lost.