-
Notifications
You must be signed in to change notification settings - Fork 7
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
FluentBuilder enum error: string to class cast exception #476
Comments
…eck if the error is gone. halkyonio#476 Signed-off-by: cmoulliard <[email protected]>
…*\ too to check if the error is gone. halkyonio#476 Signed-off-by: cmoulliard <[email protected]>
…to check if the error is gone. halkyonio#476 Signed-off-by: cmoulliard <[email protected]>
The error is coming from the If we remove from the CRD the
Is there a trick ? |
The error message still mentions '*'. So, it seems that it does creep in from somewhere. Maybe the CR? |
Comment updated with fullstack trace. |
…eck if the error is gone. #476 Signed-off-by: cmoulliard <[email protected]>
…eck if the error is gone. halkyonio#476 Signed-off-by: cmoulliard <[email protected]>
…*\ too to check if the error is gone. halkyonio#476 Signed-off-by: cmoulliard <[email protected]>
…to check if the error is gone. halkyonio#476 Signed-off-by: cmoulliard <[email protected]>
…alkyonio#476 Signed-off-by: cmoulliard <[email protected]>
… the createCrossplaneHelmRelease. halkyonio#476 Signed-off-by: cmoulliard <[email protected]>
So the issue is coming from the Release CRD definition: https://github.com/halkyonio/primaza-poc/blob/fecbea0bd9eb8e7907001878a29f341a68d78632/app/src/main/crds/helm.crossplane.io_releases.yaml and more specially the field
No matter if you set the default value as
or
we got the error:
|
…l the crossplane providers (#475) * Use the latest sundrio version Related #464 * Use the latest sundrio version Related #464 * Switch to the new repository: xpkg.upbound.io/crossplane-contrib. #474 Signed-off-by: cmoulliard <[email protected]> * Add new script installing the container registry * Revert to 0.14 as next releases intriduced the ManagementPolicies which is generating the error: String cannot be cast to class io.crossplane.helm.v1beta1.ReleaseSpec Signed-off-by: cmoulliard <[email protected]> * Add parameter to disable the script execution which requires locally to click on enter key Signed-off-by: cmoulliard <[email protected]> * Align the instructions with the github flow Signed-off-by: cmoulliard <[email protected]> * Remove non needed text Signed-off-by: cmoulliard <[email protected]> * Use helm-provider 0.18.1 which supports ManagementPolicies Signed-off-by: cmoulliard <[email protected]> * Export TIME_WAIT property Signed-off-by: cmoulliard <[email protected]> * Use url pointing to the CRD released with 0.18.1 Signed-off-by: cmoulliard <[email protected]> * Define the managementPolicies Signed-off-by: cmoulliard <[email protected]> * Reformated the KubernetesClientService class and Crossplane DSL Signed-off-by: cmoulliard <[email protected]> * Log primaza pod too as we don't get it when error HTTP 500 occurs during the binding Signed-off-by: cmoulliard <[email protected]> * Log primaza pod too as we don't get it when error HTTP 500 occurs during the binding Signed-off-by: cmoulliard <[email protected]> * Added CRDs under src/main/crds Signed-off-by: cmoulliard <[email protected]> * Moving the defintion of the fabric8 kubernetes client to be used to the parent pom Signed-off-by: cmoulliard <[email protected]> * Commenting the line containing as managementPolicies value: \*\ to check if the error is gone. #476 Signed-off-by: cmoulliard <[email protected]> * Make the titles of the job defintion a bit shorter Signed-off-by: cmoulliard <[email protected]> * Commenting the line containing as managementPolicies default value: \*\ too to check if the error is gone. #476 Signed-off-by: cmoulliard <[email protected]> * Commenting another lines containing as managementPolicies value: \*\ to check if the error is gone. #476 Signed-off-by: cmoulliard <[email protected]> * Find a temporary workaround concerning the CRD serialization issue. #476 Signed-off-by: cmoulliard <[email protected]> * Let's keep the value \'*' as enum. Remove the managementPolicies from the createCrossplaneHelmRelease. #476 Signed-off-by: cmoulliard <[email protected]> --------- Signed-off-by: cmoulliard <[email protected]> Co-authored-by: Auri Munoz <[email protected]>
…or the ticket. halkyonio#476 Signed-off-by: cmoulliard <[email protected]>
Issue
When we try to create a Crossplane Helm Release CR which is what the Primaza service (KubernetesClientService -> method: createCrossplaneHelmRelease(Cluster cluster, io.halkyon.model.Service service) do during the binding, then we got an error HTTP 500 from Primaza log
The error reported is
Code:
primaza-poc/app/src/main/java/io/halkyon/services/KubernetesClientService.java
Line 246 in ecf2f80
Remark: I dont really understand why it complains about the ManagementPolicies - https://github.com/crossplane/crossplane-runtime/blob/master/apis/common/v1/policies.go as the object that we are creating which is a
Release
do not include it: https://github.com/crossplane-contrib/provider-helm/blob/master/apis/release/v1beta1/types.goFrom @iocanel
"Ioannis Canellos: It seems to me that this is an issue with the generator. TBH, I've used that in that past (quarkus-kubevirt) and didn't have issues with enums.
The problem with the code is that it deserizes some code into a List however it doesn't populate the list with ManagementPolicies but with strings instead. So eventually it causes a class cast exception later on as this is unexpected."
Originally posted by @cmoulliard in #475 (comment)
The text was updated successfully, but these errors were encountered: