Skip to content
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

ci: Update pipelines to verify compilation on Java 17 #3612

Closed
wants to merge 1 commit into from

Conversation

manusa
Copy link
Member

@manusa manusa commented Nov 24, 2021

Description

ci: Update pipelines to verify compilation on Java 17

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

@centos-ci
Copy link

Can one of the admins verify this patch?

@manusa
Copy link
Member Author

manusa commented Nov 24, 2021

Unsupported in Karaf

2021-11-24T16:03:48,909 | ERROR | features-3-thread-1 | ManagedKubernetesClient          | 25 - io.fabric8.kubernetes-client - 5.11.0.SNAPSHOT | bundle io.fabric8.kubernetes-client:5.11.0.SNAPSHOT (25)[io.fabric8.kubernetes.client.osgi.ManagedKubernetesClient(1)] : Error during instantiation of the implementation object
java.lang.reflect.InvocationTargetException: null
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
	at org.apache.felix.scr.impl.inject.internal.ComponentConstructorImpl.newInstance(ComponentConstructorImpl.java:316) ~[?:?]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:286) ~[?:?]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:115) ~[?:?]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:1000) ~[?:?]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:973) ~[?:?]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:776) ~[?:?]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:674) ~[?:?]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:437) ~[?:?]
	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:667) ~[?:?]
	at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:305) ~[?:?]
	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:554) ~[?:?]
	at org.apache.felix.scr.impl.Activator.access$200(Activator.java:70) ~[?:?]
	at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:421) ~[?:?]
	at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) ~[?:?]
	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) ~[?:?]
	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) ~[?:?]
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:488) ~[osgi.core-7.0.0.jar:?]
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:420) ~[osgi.core-7.0.0.jar:?]
	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) ~[osgi.core-7.0.0.jar:?]
	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450) ~[osgi.core-7.0.0.jar:?]
	at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) ~[?:?]
	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) ~[?:?]
	at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) ~[?:?]
	at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4817) ~[?:?]
	at org.apache.felix.framework.Felix.startBundle(Felix.java:2336) ~[?:?]
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984) ~[?:?]
	at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.startBundle(BundleInstallSupportImpl.java:165) ~[?:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1160) ~[?:?]
	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1041) ~[?:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1069) ~[?:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:1004) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.ClassFormatError: Weaving hook failed.
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.transformClass(BundleWiringImpl.java:2371) ~[?:?]
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2049) ~[?:?]
	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1533) ~[?:?]
	at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:78) ~[?:?]
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1950) ~[?:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	at io.fabric8.kubernetes.client.ConfigBuilder.<init>(ConfigBuilder.java:11) ~[?:?]
	at io.fabric8.kubernetes.client.ConfigBuilder.<init>(ConfigBuilder.java:8) ~[?:?]
	at io.fabric8.kubernetes.client.BaseClient.<init>(BaseClient.java:45) ~[?:?]
	at io.fabric8.kubernetes.client.osgi.ManagedKubernetesClient.<init>(ManagedKubernetesClient.java:137) ~[?:?]
	... 41 more
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:196) ~[?:?]
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:177) ~[?:?]
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:163) ~[?:?]
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:284) ~[?:?]
	at org.apache.aries.spifly.dynamic.OSGiFriendlyClassWriter.getCommonSuperClass(OSGiFriendlyClassWriter.java:84) ~[?:?]
	at org.objectweb.asm.SymbolTable.addMergedType(SymbolTable.java:1202) ~[?:?]
	at org.objectweb.asm.Frame.merge(Frame.java:1299) ~[?:?]
	at org.objectweb.asm.Frame.merge(Frame.java:1197) ~[?:?]
	at org.objectweb.asm.MethodWriter.computeAllFrames(MethodWriter.java:1610) ~[?:?]
	at org.objectweb.asm.MethodWriter.visitMaxs(MethodWriter.java:1546) ~[?:?]
	at org.objectweb.asm.MethodVisitor.visitMaxs(MethodVisitor.java:772) ~[?:?]
	at org.objectweb.asm.commons.LocalVariablesSorter.visitMaxs(LocalVariablesSorter.java:148) ~[?:?]
	at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2636) ~[?:?]
	at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1488) ~[?:?]
	at org.objectweb.asm.ClassReader.accept(ClassReader.java:718) ~[?:?]
	at org.objectweb.asm.ClassReader.accept(ClassReader.java:401) ~[?:?]
	at org.apache.aries.spifly.dynamic.ClientWeavingHook.weave(ClientWeavingHook.java:60) ~[?:?]
	at org.apache.felix.framework.util.SecureAction.invokeWeavingHook(SecureAction.java:1204) ~[?:?]
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.transformClass(BundleWiringImpl.java:2357) ~[?:?]
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2049) ~[?:?]
	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1533) ~[?:?]
	at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:78) ~[?:?]
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1950) ~[?:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	at io.fabric8.kubernetes.client.ConfigBuilder.<init>(ConfigBuilder.java:11) ~[?:?]
	at io.fabric8.kubernetes.client.ConfigBuilder.<init>(ConfigBuilder.java:8) ~[?:?]
	at io.fabric8.kubernetes.client.BaseClient.<init>(BaseClient.java:45) ~[?:?]
	at io.fabric8.kubernetes.client.osgi.ManagedKubernetesClient.<init>(ManagedKubernetesClient.java:137) ~[?:?]
	... 41 more
2021-11-24T16:03:48,909 | ERROR | FelixDispatchQueue | Framework                        | 60 - org.apache.aries.spifly.dynamic.bundle - 1.3.0 | FrameworkEvent ERROR
java.lang.IllegalArgumentException: Unsupported class file major version 61
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:196) ~[?:?]
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:177) ~[?:?]
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:163) ~[?:?]
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:284) ~[?:?]
	at org.apache.aries.spifly.dynamic.OSGiFriendlyClassWriter.getCommonSuperClass(OSGiFriendlyClassWriter.java:84) ~[?:?]
	at org.objectweb.asm.SymbolTable.addMergedType(SymbolTable.java:1202) ~[?:?]
	at org.objectweb.asm.Frame.merge(Frame.java:1299) ~[?:?]
	at org.objectweb.asm.Frame.merge(Frame.java:1197) ~[?:?]
	at org.objectweb.asm.MethodWriter.computeAllFrames(MethodWriter.java:1610) ~[?:?]
	at org.objectweb.asm.MethodWriter.visitMaxs(MethodWriter.java:1546) ~[?:?]
	at org.objectweb.asm.MethodVisitor.visitMaxs(MethodVisitor.java:772) ~[?:?]
	at org.objectweb.asm.commons.LocalVariablesSorter.visitMaxs(LocalVariablesSorter.java:148) ~[?:?]
	at org.objectweb.asm.ClassReader.readCode(ClassReader.java:2636) ~[?:?]
	at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1488) ~[?:?]
	at org.objectweb.asm.ClassReader.accept(ClassReader.java:718) ~[?:?]
	at org.objectweb.asm.ClassReader.accept(ClassReader.java:401) ~[?:?]
	at org.apache.aries.spifly.dynamic.ClientWeavingHook.weave(ClientWeavingHook.java:60) ~[?:?]
	at org.apache.felix.framework.util.SecureAction.invokeWeavingHook(SecureAction.java:1204) ~[?:?]
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.transformClass(BundleWiringImpl.java:2357) ~[?:?]
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2049) ~[?:?]
	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1533) ~[?:?]
	at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:78) ~[?:?]
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1950) ~[?:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
	at io.fabric8.kubernetes.client.ConfigBuilder.<init>(ConfigBuilder.java:11) ~[?:?]
	at io.fabric8.kubernetes.client.ConfigBuilder.<init>(ConfigBuilder.java:8) ~[?:?]
	at io.fabric8.kubernetes.client.BaseClient.<init>(BaseClient.java:45) ~[?:?]
	at io.fabric8.kubernetes.client.osgi.ManagedKubernetesClient.<init>(ManagedKubernetesClient.java:137) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
	at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
	at org.apache.felix.scr.impl.inject.internal.ComponentConstructorImpl.newInstance(ComponentConstructorImpl.java:316) ~[?:?]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:286) ~[?:?]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:115) ~[?:?]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:1000) ~[?:?]
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:973) ~[?:?]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:776) ~[?:?]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:674) ~[?:?]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:437) ~[?:?]
	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:667) ~[?:?]
	at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:305) ~[?:?]
	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:554) ~[?:?]
	at org.apache.felix.scr.impl.Activator.access$200(Activator.java:70) ~[?:?]
	at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:421) ~[?:?]
	at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) ~[?:?]
	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) ~[?:?]
	at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) ~[?:?]
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:488) ~[osgi.core-7.0.0.jar:?]
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:420) ~[osgi.core-7.0.0.jar:?]
	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) ~[osgi.core-7.0.0.jar:?]
	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450) ~[osgi.core-7.0.0.jar:?]
	at org.apache.felix.framework.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:915) ~[?:?]
	at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:834) ~[?:?]
	at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:516) ~[?:?]
	at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4817) ~[?:?]
	at org.apache.felix.framework.Felix.startBundle(Felix.java:2336) ~[?:?]
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) ~[?:?]
	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984) ~[?:?]
	at org.apache.karaf.features.internal.service.BundleInstallSupportImpl.startBundle(BundleInstallSupportImpl.java:165) ~[?:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.startBundle(FeaturesServiceImpl.java:1160) ~[?:?]
	at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:1041) ~[?:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1069) ~[?:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:1004) ~[?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]

https://issues.apache.org/jira/browse/FELIX-6433

@manusa
Copy link
Member Author

manusa commented Dec 21, 2021

It seems that after the Karaf update (#3667) tests are finally passing in Java 17 🎉

@manusa manusa requested a review from rohanKanojia December 21, 2021 15:50
@manusa manusa removed the wip label Dec 21, 2021
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rohanKanojia
Copy link
Member

What is status of this PR?

@manusa
Copy link
Member Author

manusa commented Sep 9, 2022

Needs to be worked on, I'll rebase later to check what might be needed

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@manusa manusa requested review from shawkins and sunix as code owners January 11, 2023 11:16
@manusa manusa force-pushed the ci/java-17 branch 2 times, most recently from 3050a9b to 544e066 Compare September 21, 2023 10:33
@manusa
Copy link
Member Author

manusa commented Sep 21, 2023

apache/karaf#1493

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@manusa manusa mentioned this pull request Apr 9, 2024
11 tasks
@manusa manusa closed this in #5874 Apr 15, 2024
@manusa manusa deleted the ci/java-17 branch April 15, 2024 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants