fix(bbm): skip Sentry capture for transient validation errors
Summary
- During rolling deploys, BBM workers on the previous release transiently hit
InvalidJobSignatureBBMErrCodeinFindJob'svalidateMigrationcall because the new work function is not yet registered on their pod. The unconditionalerrorreporting.Capturespammed Sentry for the duration of each rollout. - Capture now fires only for non-transient validation failures, mirroring the conditional-capture pattern already used for
ErrBackgroundMigrationLockInUsein the same file (registry/bbm/bbm.go:363-371). - Behavior preserved on every path: same log line, same returned error, same store updates. Only the Sentry capture is gated.
Closes #2113 (closed)
Test plan
-
go build ./registry/bbm/... -
go vet ./registry/bbm/... -
go test ./registry/bbm/ -count=1— full bbm package suite passes -
TestFindJob_Errors"error when next job function not found" path still assertsErrWorkFunctionNotFoundis returned and noUpdateStatusis called
Edited by Suleimi Ahmed