Skip to content

KubernetesClientBootstrapConfigurationTests tests failing with NPE on 2.0.x #927

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

Closed
spencergibb opened this issue Dec 3, 2021 · 3 comments
Assignees
Labels
Milestone

Comments

@spencergibb
Copy link
Member

spencergibb commented Dec 3, 2021

Build started failing on Nov 10

https://jenkins.spring.io/view/Spring%20Cloud/view/CI/job/spring-cloud-kubernetes-2.0.x-ci/205/testReport/

org.springframework.cloud.kubernetes.client.config.KubernetesClientBootstrapConfigurationTests$KubernetesClientBootstrapConfigurationNotInsideK8s.bothMissing
Error Details

Failed to load ApplicationContext

Stack Trace

java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'kubernetesKubectlCreateProcessor': Unsatisfied dependency expressed through field 'apiClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultApiClient' defined in class path resource [io/kubernetes/client/spring/extended/controller/config/KubernetesInformerAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.kubernetes.client.openapi.ApiClient]: Factory method 'defaultApiClient' threw exception; nested exception is java.lang.NullPointerException
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultApiClient' defined in class path resource [io/kubernetes/client/spring/extended/controller/config/KubernetesInformerAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.kubernetes.client.openapi.ApiClient]: Factory method 'defaultApiClient' threw exception; nested exception is java.lang.NullPointerException
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.kubernetes.client.openapi.ApiClient]: Factory method 'defaultApiClient' threw exception; nested exception is java.lang.NullPointerException
Caused by: java.lang.NullPointerException

org.springframework.cloud.kubernetes.client.config.KubernetesClientBootstrapConfigurationTests$KubernetesEnabledSecretsAndConfigDisabled.secretsOnlyPresent
Error Details

Failed to load ApplicationContext

Stack Trace

java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'kubernetesKubectlCreateProcessor': Unsatisfied dependency expressed through field 'apiClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultApiClient' defined in class path resource [io/kubernetes/client/spring/extended/controller/config/KubernetesInformerAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.kubernetes.client.openapi.ApiClient]: Factory method 'defaultApiClient' threw exception; nested exception is java.lang.NullPointerException
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultApiClient' defined in class path resource [io/kubernetes/client/spring/extended/controller/config/KubernetesInformerAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.kubernetes.client.openapi.ApiClient]: Factory method 'defaultApiClient' threw exception; nested exception is java.lang.NullPointerException
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.kubernetes.client.openapi.ApiClient]: Factory method 'defaultApiClient' threw exception; nested exception is java.lang.NullPointerException
Caused by: java.lang.NullPointerException
@spencergibb spencergibb added the bug label Dec 3, 2021
@spencergibb spencergibb added this to the 2.0.5 milestone Dec 3, 2021
spencergibb added a commit that referenced this issue Dec 3, 2021
spencergibb added a commit that referenced this issue Dec 3, 2021
@wind57
Copy link
Contributor

wind57 commented Dec 4, 2021

to be honest that failing test is something I wrote, but I do not have access to that pipeline to tell what branch that is... I assume that is the something only available to the Spring team developers. If it could be re-produced here on github, I absolutely take a look.

@spencergibb
Copy link
Member Author

Branch is 2.0.x

@ryanjbaxter
Copy link
Contributor

Fixed via 38414c6. Looks like we still need this PR in the 11.0.x branch kubernetes-client/java#1963

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants