uber / cadence

Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.
https://cadenceworkflow.io
MIT License
7.97k stars 773 forks source link

Global ratelimiter: client-side Collection skeleton #6078

Closed Groxx closed 3 weeks ago

Groxx commented 1 month ago

A half-fleshed-out skeleton of the quotas.Collection that the frontend will use for these limits, and a chunk of pseudo-code to show how it'll be used when the RPC PR is ready (coming soon).

This is not completely usable right now and will likely need some small changes, but it has the core bits:

It will eventually need:

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 67.36842% with 31 lines in your changes missing coverage. Please review.

Project coverage is 71.99%. Comparing base (b3e21fa) to head (e2b0994). Report is 1 commits behind head on master.

Additional details and impacted files | [Files](https://app.codecov.io/gh/uber/cadence/pull/6078?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber) | Coverage Δ | | |---|---|---| | [common/clock/time\_source.go](https://app.codecov.io/gh/uber/cadence/pull/6078?src=pr&el=tree&filepath=common%2Fclock%2Ftime_source.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber#diff-Y29tbW9uL2Nsb2NrL3RpbWVfc291cmNlLmdv) | `71.42% <ø> (ø)` | | | [common/quotas/global/collection/collection.go](https://app.codecov.io/gh/uber/cadence/pull/6078?src=pr&el=tree&filepath=common%2Fquotas%2Fglobal%2Fcollection%2Fcollection.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber#diff-Y29tbW9uL3F1b3Rhcy9nbG9iYWwvY29sbGVjdGlvbi9jb2xsZWN0aW9uLmdv) | `67.36% <67.36%> (ø)` | | ... and [12 files with indirect coverage changes](https://app.codecov.io/gh/uber/cadence/pull/6078/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/uber/cadence/pull/6078?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/uber/cadence/pull/6078?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). Last update [b3e21fa...e2b0994](https://app.codecov.io/gh/uber/cadence/pull/6078?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=uber).
coveralls commented 3 weeks ago

Pull Request Test Coverage Report for Build 018fef57-8f5a-40b9-9c96-fb887e6f92f6

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
common/quotas/global/collection/collection.go 86 128 67.19%
<!-- Total: 94 136 69.12% -->
Files with Coverage Reduction New Missed Lines %
common/cache/lru.go 2 93.01%
service/history/replication/task_processor.go 2 82.76%
service/history/task/transfer_standby_task_executor.go 3 87.55%
service/history/task/task.go 3 84.81%
service/history/queue/timer_queue_processor_base.go 3 77.87%
service/history/handler/handler.go 4 96.14%
service/history/execution/cache.go 6 74.61%
<!-- Total: 23 -->
Totals Coverage Status
Change from base Build 018feeec-d7a4-4bb0-b278-1977f0e4c7ed: 0.04%
Covered Lines: 106410
Relevant Lines: 149093

💛 - Coveralls