-
Notifications
You must be signed in to change notification settings - Fork 33
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
Internalise HTTP extensions (remove dependency on HTTPlease) #166
Comments
(will be needed to modernise KubeClient's dependency injection to support Microsoft.Extensions.Http) #166
(and move common functionality to KubeClient.Core) #166
Have split the HTTP client functionality out into a separate package Later, we can look at trimming this implementation (once the dust has settled from any breaks in compatibility) but for now it's pretty close to ready for release. I'm hoping to publish the new version of KubeClient in the next week or 2. @raman-m - would you be interested in trying out the new version before I publish anything (to see if it's likely to cause any problems for you)? If so, I can make pre-release packages available on the project's MyGet feed. Otherwise, I don't mind trying to pull down the Ocelot repository and try the upgrade myself (if you don't mind answering any questions that come up while I try to get it going). |
Yes, I would be willing to collaborate on testing in January, as I am currently focused on releasing the Ocelot .NET 9 version.
Sounds reasonable. Why not wait for Ocelot v24.0, which will open a window for us to test both libraries? |
Great - thanks! Basically, as long as it turns out that I’ve maintained source-code compatibility (excluding minor namespace changes) and behavioural compatibility then I think we’re good to go. Most of my concerns around the changes are what the upgrade experience will be like for existing consumers (which I can use when adding a migration guide to the documentation). I can wait til v24.0, but will also try out the develop branch in the meanwhile. I’ll see what existing tests there are in there that relate to the area where KubeClient is being used; since we now have a TestKit for KubeClient there may be some options there too. |
BTW, I’m planning on switching from JSON.NET to System.Text.Json eventually; is this likely to cause problems for you? |
It depends. But seems we have independent referencing; thus, no problems should occur. |
KubeClient v3 should simplify dependency-management, from Ocelot's perspective: * KubeClient no longer has an external dependency (HTTPlease) for its HttpClient support. The internalised version of this support is now located in the KubeClient.Http namespace. * KubeClient v3 is multi-targeted for net9.0, as well as a couple of older versions that some consumers are still using (support for these older versions will be tailed off over the next couple of minor releases) Related discussion at: tintoy/dotnet-kube-client#166 tintoy/dotnet-kube-client#167
* Upgrade to KubeClient v3 and log failed Kubernetes API requests KubeClient v3 should simplify dependency-management, from Ocelot's perspective: * KubeClient no longer has an external dependency (HTTPlease) for its HttpClient support. The internalised version of this support is now located in the KubeClient.Http namespace. * KubeClient v3 is multi-targeted for net9.0, as well as a couple of older versions that some consumers are still using (support for these older versions will be tailed off over the next couple of minor releases) Related discussion at: tintoy/dotnet-kube-client#166 tintoy/dotnet-kube-client#167 * Don't attempt to deserialise response payload from Kubernetes API if it isn't going to be used * Simplify logging implementation by moving it out of EndPointClientV1 and into its caller * Add support for returning error responses from the fake Kubernetes API used by service-discovery tests * Revert "Add support for returning error responses from the fake Kubernetes API used by service-discovery tests" This reverts commit 9a8bf9c. * Upgrade KubeClient to v3.0.1 * Use consistent serialisation settings for fake Kubernetes API responses * Add unit tests for handling of error responses from Kubernetes API * Code review by @raman-m * Change EndPointClientV1.GetAsync into a non-async wrapper method, since it only has a single await as the last statement (return await) * Update docs with user's instructions --------- Co-authored-by: Raman Maksimchuk <[email protected]>
As discussed in #165, copy a minimum subset of functionality (e.g. URI templates, and consistent request/response handling) into dotnet-kube-client (e.g. in the
KubeClient
assembly under theKubeClient.Http
namespace) to maintain source-level compatiblity (although not binary compatibility).Where possible, use existing .NET extensions
Initial targeting should be for
net6.0
,net7.0
,net8.0
,net9.0
.Some initial notes
Possible (partial) replacement (of implementation) for HTTPlease URI-template functionality:
(note: these look impractical to consume, since the only way to get access to them would require a
<FrameworkReference Include="Microsoft.AspNetCore.App" />
from the KubeClient project that uses them)Alternative implementation (and one of the most popular) of URI templates:
https://github.com/tavis-software/Tavis.UriTemplates
The text was updated successfully, but these errors were encountered: