-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
#1314 #1869 #2072 Default timeout enhancements #2073
base: develop
Are you sure you want to change the base?
#1314 #1869 #2072 Default timeout enhancements #2073
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please find some time to rebase branch onto develop and I'll review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2nd round has finished! My suggestions are below.
src/Ocelot.Provider.Polly/PollyQoSResiliencePipelineProvider.cs
Outdated
Show resolved
Hide resolved
src/Ocelot.Provider.Polly/PollyQoSResiliencePipelineProvider.cs
Outdated
Show resolved
Hide resolved
src/Ocelot.Provider.Polly/PollyQoSResiliencePipelineProvider.cs
Outdated
Show resolved
Hide resolved
Additionally, we must consider this #2072 (comment). We have an existing
We need to find a way to repurpose it, as it is particularly pertinent to issue #1869 |
637518e
to
596793d
Compare
Ok, I found a solution, can you take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, thanks a lot, we should clarify the logic though. In my opinion, we should set a default global timeout value in the FileGlobalConfiguration and handle everything in the ITimeoutCreator
implementation.
src/Ocelot.Provider.Polly/PollyQoSResiliencePipelineProvider.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will continue to make suggestions without the expectation of immediate implementation.
We are currently facing design conflicts... 😢
@hogwartsdeveloper, please exercise patience! Our discussions may be lengthy, and delivering both linked features will be challenging. I am optimistic that we will reach a consensus on the current design and necessary refactoring.
At present, it is imperative to include this PR in the current release. The community has been eagerly awaiting the "default timeout feature", which is a high-priority item. Therefore, I will assign this PR to the Spring'24 milestone.
src/Ocelot.Provider.Polly/PollyQoSResiliencePipelineProvider.cs
Outdated
Show resolved
Hide resolved
src/Ocelot.Provider.Polly/PollyQoSResiliencePipelineProvider.cs
Outdated
Show resolved
Hide resolved
src/Ocelot.Provider.Polly/PollyQoSResiliencePipelineProvider.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hogwartsdeveloper
Here's a summary of today's team discussions:
- Change all
int
return types toint?
for the properties:FileRoute.Timeout
,FileGlobalConfiguration.TimeoutSeconds
, andFileQoSOptions.TimeoutValue
. We've reached a consensus to make them nullable, which will enable us to write cleaner code without gaps in business logic. - Relocate the
ITimeoutCreator.Create
method to theIRoutesCreator
interface as theCreateTimeout
method. TheITimeoutCreator
micro-interface seems unnecessary with only one reference and one injection. Moreover, the implementation is one line of code. It will be tested as part of theRoutesCreator
class.
These are the essential changes required❗
src/Ocelot.Provider.Polly/PollyQoSResiliencePipelineProvider.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@raman-m Thanks a a lot @hogwartsdeveloper, I think the QoS issues are not part of this current PR scope, we should address it in a later PR. We are almost there, but it would be wise to use the same property names for the Timeout on the global configuration and the route configuration, with milliseconds precision. Some Acceptance tests are missing (Testing if the Global configuration Timeout is working as expected, that the QoS Timeout value has priority over the global / route Timeout value).
…Route`, which determines this value based on the QoS mode. The `DefaultTimeoutSeconds` should be defined in a single reusable location, currently within `DownstreamRoute`.
Add the NoWait test helper, which is based on the Retry pattern.
…se it is singleton service! Make default timeout properties static.
TODO
|
Closes #1314 #1869
HttpMessageInvoker
#1314HttpMessageInvoker
via route configuration #1869Proposed Changes
FileGlobalConfiguration
addRequestTimeoutSeconds
MessageInvokerPool
useRequestTimeoutSeconds
Discussion
Successors