Closed guillaume-chervet closed 8 months ago
This looks to be related to #1311
AOT will be supported for sure
Can't wait for it 😜 it would be awesome!
PR is also welcomed,
related #1463
hi @guillaume-chervet here is a draft version of aot too many warnings and many things need to be fixed but first working code
https://github.com/tg123/csharp/tree/aotfinal/examples/aot
dotnet publish -r win-x64 -c Debug
~20M binary
your input is welcomed, i am still working on cleaning things up
Hi @tg123 thank you very much! Is it possible to publish alpha version? I need at least a working trimming mode. AOT will be the next step.
seems too many lib to cleanu, i am thinking add a Kubenetesclient.AOT
for aot only
why do you want trim only? btw
AOT will be very fine, but Trimming for à first step will be Nice. This discution is interresting https://github.com/dotnet/dotNext/discussions/200#discussioncomment-7439454
Hi @tg123 are your still working on this?
I really need to activate trimming and better will be AOT for Slimfaas : https://github.com/AxaFrance/SlimFaas
I may be will have more time if you need some help.
yup please allow more time on this
hi @tg123 ,
Thank you s much for your work. Is it possible to publish a beta of KubernetesClient.Aot ?
in order to be able to test it :)
I have tested it @tg123 ,
List deployments and statefulset works well. For the moment I Have activated Trimming mode (I will test AOT after having a working trimmin mode).
When try to scale down for example It crash.
2024-02-02 09:22:36 fail: SlimFaas.ScaleReplicasWorker[0]
2024-02-02 09:22:36 Global Error in ScaleReplicasWorker
2024-02-02 09:22:36 System.ArgumentNullException: Value cannot be null. (Parameter 'jsonTypeInfo')
2024-02-02 09:22:36 at System.Text.Json.ThrowHelper.ThrowArgumentNullException(String)
2024-02-02 09:22:36 at k8s.Kubernetes.SendRequest[T](String, HttpMethod, IReadOnlyDictionary`2, T, CancellationToken)
2024-02-02 09:22:36 at k8s.AbstractKubernetes.IAppsV1Operations_PatchNamespacedDeploymentScaleWithHttpMessagesAsync[T](V1Patch, String, String, String, String, String, Nullable`1, Nullable`1, IReadOnlyDictionary`2, CancellationToken)
2024-02-02 09:22:36 at k8s.AbstractKubernetes.k8s.IAppsV1Operations.PatchNamespacedDeploymentScaleWithHttpMessagesAsync(V1Patch, String, String, String, String, String, Nullable`1, Nullable`1, IReadOnlyDictionary`2, CancellationToken)
2024-02-02 09:22:36 at k8s.AppsV1OperationsExtensions.PatchNamespacedDeploymentScaleAsync(IAppsV1Operations, V1Patch, String, String, String , String , String , Nullable`1 , Nullable`1 , CancellationToken )
2024-02-02 09:22:36 at SlimFaas.Kubernetes.KubernetesService.ScaleAsync(ReplicaRequest request)
2024-02-02 09:22:36 at SlimFaas.ReplicasService.CheckScaleAsync(String kubeNamespace)
2024-02-02 09:22:36 at SlimFaas.ScaleReplicasWorker.ExecuteAsync(CancellationToken stoppingToken)
The code :
Do you hav e an idea @tg123 ?
patch is not supported in aot yet
Hi @tg123 ,
Do you think it will be very soon ? My Image shrink a lot just with Timming. I Can't wait to see used ram in production in trimming mode or AOT :)
i am working on watch but let me see if i can make patch aot first
@tg123 Thank you, patch aot first would be awesome :)
Describe the bug
Than you for your work ont this library about kubernetes :)
We would like to activate .NET 8 AOT on SlimFaas which is also an open source project. Compilation work, but execution crash on that line : https://github.com/AxaFrance/SlimFaas/blob/5c5a1f39ae3b0e6bee8a8cdf27ec85f95607b404/src/SlimFaas/Kubernetes/KubernetesService.cs#L66
The SlimFaas PullRequest : https://github.com/AxaFrance/SlimFaas/pull/23
Kubernetes C# SDK Client Version
Dotnet Runtime Version 8.0.100-preview.7.23376.3
To Reproduce Build an AOT program which use this function : https://github.com/AxaFrance/SlimFaas/blob/5c5a1f39ae3b0e6bee8a8cdf27ec85f95607b404/src/SlimFaas/Kubernetes/KubernetesService.cs#L66
Expected behavior Does not crash once compile with AOT