fix(bbm): skip Sentry capture for transient validation errors

Summary

  • During rolling deploys, BBM workers on the previous release transiently hit InvalidJobSignatureBBMErrCode in FindJob's validateMigration call because the new work function is not yet registered on their pod. The unconditional errorreporting.Capture spammed Sentry for the duration of each rollout.
  • Capture now fires only for non-transient validation failures, mirroring the conditional-capture pattern already used for ErrBackgroundMigrationLockInUse in 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 asserts ErrWorkFunctionNotFound is returned and no UpdateStatus is called
Edited by Suleimi Ahmed

Merge request reports

Loading