• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bolshakov / stoplight / 15327903014
100%

Build:
DEFAULT BRANCH: master
Ran 29 May 2025 03:52PM UTC
Jobs 3
Files 37
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 May 2025 03:51PM UTC coverage: 100.0%. Remained the same
15327903014

push

github

web-flow
Implement clock skew detection (#323)

Stoplight's distributed, leader-less architecture relies on time-based coordination for circuit breaker decisions. Clock skew between servers can cause inconsistent behavior:

- Different instances may see different error counts for the same time window
- Recovery timing coordination becomes unreliable
- Color transitions may occur at different times across the instances

This PR introduces automatic clock skew detection in the Redis Data Store:

* Probabilistic checking: Runs detection ~1% of the time to minimize performance impact
* Configurable warnings: Can be disabled via `warn_on_clock_skew: false` parameter
* Clear guidance: Warning messages link to wiki documentation

Example warning:

> Detected clock skew between Redis and the application server. Redis time: 1748277980, Application time: 1748274380. See https://github.com/bolshakov/stoplight/wiki/Clock-Skew-and-Stoplight-Reliability

Usage:

```ruby
# Default behavior - warnings enabled
data_store = Stoplight::DataStore::Redis.new(redis)

# Disable warnings if needed (e.g., testing environments)
data_store = Stoplight::DataStore::Redis.new(redis, warn_on_clock_skew: false)
```

14 of 14 new or added lines in 1 file covered. (100.0%)

829 of 829 relevant lines covered (100.0%)

907.53 hits per line

Jobs
ID Job ID Ran Files Coverage
1 ruby-3.2 - 15327903014.1 29 May 2025 03:52PM UTC 37
100.0
GitHub Action Run
2 ruby-3.3 - 15327903014.2 29 May 2025 03:52PM UTC 37
100.0
GitHub Action Run
3 ruby-3.4 - 15327903014.3 29 May 2025 03:52PM UTC 37
100.0
GitHub Action Run
Source Files on build 15327903014
  • Tree
  • List 37
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 2f5a0a00 on github
  • Prev Build on master (#15298336063)
  • Next Build on master (#15393314413)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc