-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add overloads taking CancellationToken, for async configuration-providing delegates #19
Comments
Yes, absolutely agree, We can't assume a default value for |
Hi @vany0114 . Yes, exactly that. Actually, it looks like there are already overloads configuring delegates which take What do you think? I have learnt with Polly that - with the current syntax model - it is easy for numbers of overloads to proliferate by adding new possibilities. Worth considering not to add every possible combination, or even whether to replace existing most-complex overloads with ones which also take a (The longer-term solution to the many-configuration-overloads problem is to change the syntax to |
Another question arises: if the delegates to asynchronously retrieve configuration for latency, Exception or TResult can take (i) The (ii) But that's not the same as a short timeout on obtaining chaos configuration. If we want to add the feature of a short timeout on obtaining chaos configuration, then either:
Thoughts? |
Hi @reisenberger, I agree, I remember you told me about that idea before, and I think it's great! since it will allow Simmy to grow easier, so having said that, once we finished with that new syntax, I think we can implement the scenario you explained above (receiving a timeout for configuration delegates --should be easier then--) and for now, just let people handle it using Polly. In the meantime, I can create a PR to allow the P.S: after that, I can start to work on the new syntax. |
@vany0114 , Sounds like a great plan, please go ahead! It's awesome working with you on Simmy and we are really happy for you to drive ideas and make recommendations like this. 💯 👍 🙏 |
My pleasure @reisenberger, I'm very happy working with you guys, I'm learning a lot! |
As @martincostello mentions here, given the Simmy API does offer async overloads to obtain configuration values in the async cases, those APIs might want take to a
CancellationToken
.We would need to agree what the assumptions should be if cancellation was signalled for a config-obtaining delegate:
bool enabled
, we would probably have no option but to assume cancellation means we returnfalse
injectionRate
orTimespan
we would probably likewise have no better option than to assume cancellation means the fault-injection operation should default to not injecting the faultThoughst?
x-ref: #18 affects same APIs
The text was updated successfully, but these errors were encountered: