OctopusDeploy / Halibut

| Public | A secure communication stack for .NET using JSON-RPC over SSL.
Other
12 stars 44 forks source link

Enforce that HalibutProxyRequestOptions is provided on each RPC call, forcing callers to provide CancellationToken[s] #586

Open LukeButters opened 11 months ago

LukeButters commented 11 months ago

Currently the client proxy interface is permitted to not supply a HalibutProxyRequestOptions, which means the caller does not provide a CancellationToken so the code must generate CancellationToken.None and the caller has no way of cancelling that token.

This also lead to situations in which the code needs to do null checking to see if the HalibutProxyRequestOptions are passed or not.

To complete this we should enforce that HalibutProxyRequestOptions must be provided for every RPC call e.g. the client service contracts must support this parameter and the Proxy enforces it is not null.

See details here https://github.com/OctopusDeploy/Halibut/pull/525#discussion_r1403757915