Skip to content

Handle Redis cluster errors in Metrics increment methods#8519

Merged
iHiD merged 1 commit into
mainfrom
fix/8433
Feb 9, 2026
Merged

Handle Redis cluster errors in Metrics increment methods#8519
iHiD merged 1 commit into
mainfrom
fix/8433

Conversation

@iHiD
Copy link
Copy Markdown
Member

@iHiD iHiD commented Feb 9, 2026

Closes #8433

Summary

  • Rescue Redis::Cluster::InitialSetupError and RedisClient::Cluster::InitialSetupError in the Metrics module's increment_num_*! methods
  • These counters are periodically recalculated from the database via set_num_*!, so a missed increment during a transient Redis connectivity issue is harmless
  • Follows the same approach as the existing guard in ToolingJob::Create, but silently rescues instead of retrying since these run inside after_create callbacks

Test plan

  • Existing Metric::Create tests pass (8 tests, 24 assertions)
  • Rubocop passes via pre-commit hook

🤖 Generated with Claude Code

Rescue Redis::Cluster::InitialSetupError and
RedisClient::Cluster::InitialSetupError in the dynamically defined
increment_num_*! methods. These counters are periodically recalculated
from the database, so a missed increment during a transient Redis
connectivity issue is harmless.

Closes #8433

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@iHiD iHiD merged commit 1870ac7 into main Feb 9, 2026
41 checks passed
@iHiD iHiD deleted the fix/8433 branch February 9, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant