-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
semaphore with dynamic key+number #11890
Comments
Hmm I think this proposal has a bit of an issue -- The ConfigMap for semaphores acts as a single source of truth between all Workflows that use the same semaphore. I suppose this could be rewritten where only the number is taken from a ConfigMap (and not the key), something like |
maxInParallel in this case could even be specific to the workflow for my usecase. don't mind having the wfprefix name appended to the semaphore name, the key thing being that a new key name (ie table value could appear in sensor expression) but me not having to statically define that name beforehand |
Hmm that is a slightly different use-case. That straddles in between the current
But yea I understand the use-case and do think it's not altogether that unique and therefore broadly useful. There are some small gaps (like this one and multi-semaphore) in the current synchronization API that some use-cases aren't quite covered by. The ergonomics of the API and how that compares to existing APIs would be the main challenge now. |
Dynamic keys were also suggested in #7302 (comment) |
Summary
Currently mutex allows a dynamic key (example incoming tablename from an argo event). But only allows max 1 wf to consume it.
Currently semaphore requires a static key name (pre-defined in configmap) but allows n number of wfs to consume it.
This new proposal is about having the flexibility from both worlds. ie a semaphore that allows dynamic key (not pre-defined in configmap) and ability to specify n wfs to consume it.
I imagine on a sensor it could look like:
Use Cases
To dynamically rate limit the platform, avoid new tables being resource hogs
The text was updated successfully, but these errors were encountered: