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

Update images for CircleCI #1004

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

izeye
Copy link
Contributor

@izeye izeye commented Mar 18, 2025

This PR updates images for CircleCI.

This commit also adds a build for JDK 23.

Signed-off-by: Johnny Lim <[email protected]>
izeye added a commit to izeye/tracing that referenced this pull request Mar 18, 2025
@izeye izeye mentioned this pull request Mar 18, 2025
@izeye
Copy link
Contributor Author

izeye commented Mar 18, 2025

I reverted the changes for the JDK 23 build as the version of the Byte Buddy that the version of the Mockito in the 1.3.x branch depends on doesn't seem to support JDK 23 as follows:

> Task :micrometer-tracing:test

TracingAwareMeterObservationHandlerTests > spanShouldBeAvailableOnStop() FAILED
    org.mockito.exceptions.base.MockitoException: 
    Mockito cannot mock this class: interface io.micrometer.tracing.CurrentTraceContext$Scope.

    If you're not sure why you're getting this error, please open an issue on GitHub.


    Java               : 23
    JVM vendor name    : Eclipse Adoptium
    JVM vendor version : 23.0.2+7
    JVM name           : OpenJDK 64-Bit Server VM
    JVM version        : 23.0.2+7
    JVM info           : mixed mode, sharing
    OS name            : Linux
    OS version         : 6.8.0-1024-aws


    You are seeing this disclaimer because Mockito is configured to create inlined mocks.
    You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc.

    Underlying exception : org.mockito.exceptions.base.MockitoException: Could not modify all classes [interface java.io.Closeable, interface java.lang.AutoCloseable, interface io.micrometer.tracing.CurrentTraceContext$Scope]
        at app//io.micrometer.tracing.handler.TracingAwareMeterObservationHandlerTests.spanShouldBeAvailableOnStop(TracingAwareMeterObservationHandlerTests.java:87)

        Caused by:
        org.mockito.exceptions.base.MockitoException: Could not modify all classes [interface java.io.Closeable, interface java.lang.AutoCloseable, interface io.micrometer.tracing.CurrentTraceContext$Scope]
            at app//net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:168)
            at app//net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:399)
            at app//net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:190)
            at app//net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:410)
            ... 1 more

            Caused by:
            java.lang.IllegalStateException: 
            Byte Buddy could not instrument all classes within the mock's type hierarchy

            This problem should never occur for javac-compiled classes. This problem has been observed for classes that are:
             - Compiled by older versions of scalac
             - Classes that are part of the Android distribution
                at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.triggerRetransformation(InlineBytecodeGenerator.java:285)
                at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.mockClass(InlineBytecodeGenerator.java:218)
                at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator.lambda$mockClass$0(TypeCachingBytecodeGenerator.java:78)
                at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:168)
                at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:399)
                at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:190)
                at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:410)
                at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator.mockClass(TypeCachingBytecodeGenerator.java:75)
                at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.createMockType(InlineDelegateByteBuddyMockMaker.java:414)
                at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.doCreateMock(InlineDelegateByteBuddyMockMaker.java:373)
                at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.createMock(InlineDelegateByteBuddyMockMaker.java:352)
                at org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker.createMock(InlineByteBuddyMockMaker.java:56)
                at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:99)
                at org.mockito.internal.MockitoCore.mock(MockitoCore.java:84)
                at org.mockito.Mockito.mock(Mockito.java:2104)
                at org.mockito.Mockito.mock(Mockito.java:2019)
                ... 1 more

                Caused by:
                java.lang.IllegalArgumentException: Java 23 (67) is not supported by the current version of Byte Buddy which officially supports Java 22 (66) - update Byte Buddy or set net.bytebuddy.experimental as a VM property
                    at net.bytebuddy.utility.OpenedClassReader.of(OpenedClassReader.java:100)
                    at net.bytebuddy.dynamic.scaffold.TypeWriter$Default$ForInlining.create(TypeWriter.java:4011)
                    at net.bytebuddy.dynamic.scaffold.TypeWriter$Default.make(TypeWriter.java:2224)
                    at net.bytebuddy.dynamic.DynamicType$Builder$AbstractBase$UsingTypeWriter.make(DynamicType.java:4055)
                    at net.bytebuddy.dynamic.DynamicType$Builder$AbstractBase.make(DynamicType.java:3739)
                    at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.transform(InlineBytecodeGenerator.java:402)
                    at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:242)
                    at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
                    at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:610)
                    at java.instrument/sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
                    at java.instrument/sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:225)
                    at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.triggerRetransformation(InlineBytecodeGenerator.java:281)
                    ... 16 more

I created #1005 for the main branch instead.

@jonatan-ivanov jonatan-ivanov added build A change in our build-system type: task A general task labels Mar 19, 2025
@jonatan-ivanov jonatan-ivanov added this to the 1.3.11 milestone Mar 19, 2025
@jonatan-ivanov jonatan-ivanov merged commit a605704 into micrometer-metrics:1.3.x Mar 19, 2025
7 checks passed
@jonatan-ivanov
Copy link
Member

Thank you!

jonatan-ivanov pushed a commit that referenced this pull request Mar 19, 2025
See gh-1004

Signed-off-by: Johnny Lim <[email protected]>
@izeye izeye deleted the update-images branch March 19, 2025 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build A change in our build-system type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants