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

SDK incompatible with Kotlin 1.6.x #736

Closed
cloudshiftchris opened this issue Oct 28, 2022 · 5 comments
Closed

SDK incompatible with Kotlin 1.6.x #736

cloudshiftchris opened this issue Oct 28, 2022 · 5 comments
Labels
bug This issue is a bug. wontfix We have determined that we will not resolve the issue.

Comments

@cloudshiftchris
Copy link

Describe the bug

Using AWS Kotlin SDK 0.17.9 as part of a Gradle plugin. Gradle embeds Kotlin as part of its distribution; the Kotlin version is tied to the Gradle version. As of latest Gradle 7.5.1, Kotlin 1.6.21 is embedded.

When using the AWS Kotlin SDK the below exception is encountered due to the SDK being compiled against Kotlin 1.7.x.

java.lang.NoSuchMethodError: 'long kotlin.time.TimeSource$Monotonic.markNow-z9LOYto()'
        at aws.smithy.kotlin.runtime.http.operation.SerializeHandler.call(SdkOperationExecution.kt:209)
        at aws.smithy.kotlin.runtime.http.operation.SerializeHandler.call(SdkOperationExecution.kt:102)
        at aws.smithy.kotlin.runtime.http.operation.InitializeHandler.call(SdkOperationExecution.kt:99)
        at aws.smithy.kotlin.runtime.io.middleware.Phase.handle(Phase.kt:60)
        at aws.smithy.kotlin.runtime.io.middleware.DecoratedHandler.call(Middleware.kt:40)
        at aws.smithy.kotlin.runtime.http.operation.SdkHttpOperationKt.execute(SdkHttpOperation.kt:85)
        at aws.smithy.kotlin.runtime.http.operation.SdkHttpOperationKt.roundTrip(SdkHttpOperation.kt:68)
        at aws.sdk.kotlin.services.codeartifact.DefaultCodeartifactClient.getAuthorizationToken(DefaultCodeartifactClient.kt:505)
        at cloudshift.gradle.settings.plugin.repository.codeartifact.tokenresolver.aws.AwsCodeArtifactTokenRepository.acquireTokenInternal(AwsCodeArtifactTokenRepository.kt:86)
        at cloudshift.gradle.settings.plugin.repository.codeartifact.tokenresolver.aws.AwsCodeArtifactTokenRepository.resolve(AwsCodeArtifactTokenRepository.kt:32)
        at cloudshift.gradle.settings.plugin.repository.codeartifact.tokenresolver.CodeArtifactTokenResolver$LoggingTokenRepositoryProxy.resolve(CodeArtifactTokenResolver.kt:51)
        at cloudshift.gradle.settings.plugin.repository.codeartifact.tokenresolver.CodeArtifactTokenResolver.tokenFromApi(CodeArtifactTokenResolver.kt:27)
        at cloudshift.gradle.settings.plugin.repository.codeartifact.tokenresolver.CodeArtifactTokenResolver.resolve(CodeArtifactTokenResolver.kt:20)
        at cloudshift.gradle.settings.plugin.repository.codeartifact.CodeArtifactService.obtainToken(CodeArtifactService.kt:24)
        at cloudshift.gradle.settings.plugin.repository.codeartifact.CodeArtifactTokenValueSource$obtain$1.invokeSuspend(CodeArtifactTokenValueSource.kt:28)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:284)
        at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
        at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
        at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
        at cloudshift.gradle.settings.plugin.repository.codeartifact.CodeArtifactTokenValueSource.obtain(CodeArtifactTokenValueSource.kt:27)
        at cloudshift.gradle.settings.plugin.repository.codeartifact.CodeArtifactTokenValueSource.obtain(CodeArtifactTokenValueSource.kt:15)

Expected behavior

AWS Kotlin SDK work on Kotlin 1.6.x.

Current behavior

AWS Kotlin SDK does not work on Kotlin 1.6.x as detailed above

Steps to Reproduce

Include AWS Kotlin SDK in any Gradle 7.5.1 build script and make an API call.

Possible Solution

No response

Context

Unable to use AWS Kotlin SDK in any release version of Gradle.

AWS Kotlin SDK version used

0.17.9

Platform (JVM/JS/Native)

JVM

Operating System and version

MacOS Ventura

@cloudshiftchris cloudshiftchris added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 28, 2022
@aajtodd
Copy link
Contributor

aajtodd commented Oct 28, 2022

Thanks for the bug report. Indeed this was previously encountered here with users upgrading to 1.7.x. We decided to resolve the previous issue by updating to 1.7.x and just rolling forward.

I'm not sure if there are any other uses but we can take a look at removing our usage of measureTimedValue to see if we can restore Kotlin 1.6.x compatibility. We will discuss and decide how to resolve.

In the meantime you might try 0.16.4-beta which was the last release before upgrading to 1.7.x

@aajtodd aajtodd removed the needs-triage This issue or PR still needs to be triaged. label Oct 28, 2022
@aajtodd aajtodd assigned aajtodd and unassigned aajtodd Oct 28, 2022
@cloudshiftchris
Copy link
Author

Thanks for the prompt response. Indeed, 0.16.4 works w/ Gradle 7.5.1 / Kotlin 1.6.21 - thanks for the advice.

Is there a compatibility statement/matrix/plan, e.g. n-2 versions are supported, etc?

@aajtodd
Copy link
Contributor

aajtodd commented Oct 28, 2022

There is no compatibility statement on Kotlin versions right now as we are still in developer preview and plan to take new Kotlin versions eagerly until GA.

@aajtodd
Copy link
Contributor

aajtodd commented Jul 7, 2023

We've published a versioning policy that discusses Kotlin support.

As we march towards a GA release we will continue to take new releases of Kotlin as they come. We will not be pursuing backwards compatibility with older Kotlin versions prior to our GA date (and possibly after as indicated in our policy).

@aajtodd aajtodd closed this as completed Jul 7, 2023
@aajtodd aajtodd added the wontfix We have determined that we will not resolve the issue. label Jul 7, 2023
@github-actions
Copy link

github-actions bot commented Jul 7, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. wontfix We have determined that we will not resolve the issue.
Projects
None yet
Development

No branches or pull requests

2 participants