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

uber / cadence / 018f185f-6b8d-4346-91c0-8e814148aa4f
72%

Build:
DEFAULT BRANCH: master
Ran 26 Apr 2024 03:42AM UTC
Jobs 1
Files 673
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

26 Apr 2024 03:07AM UTC coverage: 67.782% (+0.08%) from 67.702%
018f185f-6b8d-4346-91c0-8e814148aa4f

push

buildkite

web-flow
Global ratelimiter, part 2: Any-typed RPCs, mappers, and stub handler (#5817)

Docs are broadly the same as https://github.com/uber/cadence-idl/pull/168, but are repeated here for visibility with some additions at the end for stuff unique to this repo:

# Any type:
This API is purely for inter-Cadence-service use, and the Thrift equivalent is in the github.com/uber/cadence-idl repository: https://github.com/uber/cadence-idl/pull/168

Design-wise: this has gone through several adjustment and experimenting rounds, and nearly all top-level keys I can come up with are either totally insufficient or totally unnecessary for one ratelimit design or another, so I've leaned more and more towards "define nothing, allow passing anything".

In the extreme, this means: just one `Any` field.  We can add more later if needed / if we discover some kind of truly universal data that is always worth including.
Obviously this is not super ergonomic, but as the ratelimiter is intended to be pluggable by outside implementations it cannot *wholly* be defined in internal protocol definitions.  There needs to be an extendable type of some kind, and arbitrarily requiring e.g. a `list<?>` or `map<string,?>` doesn't actually lend any beneficial semantics to the system, nor reduce space on the wire.

Implementers will need to maintain in-process definitions on both ends of the protocol, and check type IDs before decoding.  Generally speaking this is probably best done with either a shared protobuf-or-something definition (anywhere) or something schema-free like JSON, so cross-version communication can be done safely e.g. during server upgrades.

# Intended use
Eventually this will be part of a pluggable global-ratelimit-data-exchange system, for anything that can make use of the high level "periodically check in to sharded hosts, share data, update limits" pattern that github.com/uber/cadence/common/quotas/global is building up.

The first version will end up using... (continued)

65 of 65 new or added lines in 5 files covered. (100.0%)

11 existing lines in 6 files now uncovered.

99468 of 146748 relevant lines covered (67.78%)

2457.18 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
89.05
0.5% common/task/weighted_round_robin_task_scheduler.go
1
78.23
0.41% service/history/queue/timer_queue_processor_base.go
2
93.06
-1.39% common/task/parallel_task_processor.go
2
81.58
-1.32% common/peerprovider/ringpopprovider/config.go
2
81.16
0.0% service/matching/taskListManager.go
3
86.6
1.55% service/history/task/fetcher.go
Jobs
ID Job ID Ran Files Coverage
1 018f185f-6b8d-4346-91c0-8e814148aa4f.1 26 Apr 2024 03:42AM UTC 673
67.78
Source Files on build 018f185f-6b8d-4346-91c0-8e814148aa4f
  • Tree
  • List 673
  • Changed 282
  • Source Changed 0
  • Coverage Changed 28
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 9cbff9c4 on github
  • Prev Build on master (#018F1774...)
  • Next Build on master (#018F1C52...)
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

© 2026 Coveralls, Inc