manusa on master
[java-generator] Reflect the 's… (compare)
[INFO] Running io.fabric8.kubernetes.client.dsl.internal.uploadable.PodUploadTest
[ERROR] Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 13.88 s - in io.fabric8.kubernetes.client.dsl.internal.uploadable.PodUploadTest
[INFO] Running io.fabric8.kubernetes.client.dsl.internal.uploadable.PodUploadWebSocketListenerTest
[ERROR] Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.246 s - in io.fabric8.kubernetes.client.dsl.internal.uploadable.PodUploadWebSocketLis
tenerTest
[INFO] Running io.fabric8.kubernetes.client.extended.leaderelection.LeaderElectorBuilderTest
[ERROR] Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 9.477 s - in io.fabric8.kubernetes.client.extended.leaderelection.LeaderElectorBuilderT
est
[INFO] Running io.fabric8.kubernetes.client.extended.leaderelection.LeaderElectorTest
[ERROR] Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[ERROR] Tests run: 11, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 12.854 s <<< FAILURE! - in io.fabric8.kubernetes.client.ex
tended.leaderelection.LeaderElectorTest
[ERROR] io.fabric8.kubernetes.client.extended.leaderelection.LeaderElectorTest.loopInterruptedShouldShutdownExecutorService Time elapsed: 0.1 s <<< FAILURE!
java.lang.AssertionError: expected:<0> but was:<1>
at io.fabric8.kubernetes.client.extended.leaderelection.LeaderElectorTest.loopInterruptedShouldShutdownExecutorService(LeaderElectorTest.java:195)
[INFO] Running io.fabric8.kubernetes.client.extended.leaderelection.resourcelock.ConfigMapLockTest
[ERROR] Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.713 s - in io.fabric8.kubernetes.client.extended.leaderelection.resourcelock.ConfigMa
pLockTest
[INFO] Running io.fabric8.kubernetes.client.extended.leaderelection.resourcelock.LeaseLockTest
[ERROR] Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.427 s - in io.fabric8.kubernetes.client.extended.leaderelection.resourcelock.LeaseLoc
kTest
[INFO] Running io.fabric8.kubernetes.client.extended.run.RunConfigUtilTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.536 s - in io.fabric8.kubernetes.client.extended.run.RunConfigUtilTest
[INFO] Running io.fabric8.kubernetes.client.extended.run.RunOperationsTest
[ERROR] Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
mvn clean install -DskipTests
kubernetes-itests/
directory
git checkout -- kubernetes-itests/ master
@EnableKnativeMockClient
, @EnableTektonMockClient
etc
Hi, this method of SharedInformerFactory
is deprecated in version 5.5.0public synchronized <T extends HasMetadata> SharedIndexInformer<T> sharedIndexInformerFor(Class<T> apiTypeClass, OperationContext operationContext, long resyncPeriodInMillis)
This could be an alternative implementation to OperationContext
to watch labelled workloads?
SharedIndexInformer<Pod> podInformer = kubernetesClient.pods()
.withLabels(DEFAULT_SELECTORS)
.inform(podHandler, RESYNC_PERIOD);
Hi,
My team is facing a new issue after uptaking 5.4.0 that we have not seen with previous versions. The problem comes when we have a SharedInformer for a class where the CRD has been loaded in the cluster but no actual CRD resources have been created.
We have some code to get the list of resources in a workspace from the informer cache:
final var indexer = resourceInformer.getIndexer();
final var resourcesListOptional = Optional.ofNullable(indexer.byIndex(Cache.NAMESPACE_INDEX, namespace));
This existing code is now with 5.4.0 producing an exception:
Caused by: java.lang.NullPointerException
at io.fabric8.kubernetes.client.informers.cache.Cache.byIndex(Cache.java:291)
Note that the byIndex method does a check for existence of indexName in "indexers" but does not do an equivalent check in "indices". There seems to be an assumption that indices would have the same keys as indexers and in the constructor they are both initialized with the same key "namespace". However in our scenario I am observing that indexers still contains the "namespace" key but indices is an empty map. Hence we get the null pointer exception on line 291.
I have observed that when the informer is starting the Cache::replace method is being called with an empty list parameter. Then on line 157 it sets indices to a new/empty map. Since there are no items there is no additional initialization performed on indices. The call stack looks like:
Cache::replace (157)
ProcessorStore::replace (90)
Reflector::listSyncAndWatch (83)
Controller::run (93)
It appears that we don't have any mechanism to check for this condition since the Cache indices property is private.
Would anyone please suggest a check, work-around, or fix?