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

DynamoDB Local conflicts with Kotlin #4213

Closed
vgiguere opened this issue Jul 19, 2023 · 10 comments
Closed

DynamoDB Local conflicts with Kotlin #4213

vgiguere opened this issue Jul 19, 2023 · 10 comments
Labels
dynamodb-local feature-request A feature should be added or improved. p3 This is a minor priority issue

Comments

@vgiguere
Copy link

Describe the bug

DynamoDBLocal-1.X and 2.0 come compiled with overrides of kotlin classes defined in kotlin core libs. It creates conflicts and prevents DynamoDBLocal from being used in Kotlin applications.

Similar issues have been opened on this in the past, it was decided not to fix it.

I am kindly asking to reconsider this decision because it is blocking kotlin users, which is a fast growing community, from using DynamoDBLocal in their kotlin apps for integration tests etc. I work for a major client of AWS and it is impacting us.

The error we get is:

`
An attempt was made to call a method that does not exist. The attempt was made from the following location:

aws.smithy.kotlin.runtime.http.operation.SerializeHandler.call(SdkOperationExecution.kt:396)

The following method did not exist:

'long kotlin.time.TimeSource$Monotonic.markNow-z9LOYto()'

The calling method's class, aws.smithy.kotlin.runtime.http.operation.SerializeHandler, was loaded from the following location:

jar:file:/xxx/.m2/repository/aws/smithy/kotlin/http-client-jvm/0.22.1/http-client-jvm-0.22.1.jar!/aws/smithy/kotlin/runtime/http/operation/SerializeHandler.class

The called method's class, kotlin.time.TimeSource$Monotonic, is available from the following locations:

jar:file:/xxx/.m2/repository/com/amazonaws/DynamoDBLocal/2.0.0/DynamoDBLocal-2.0.0.jar!/kotlin/time/TimeSource$Monotonic.class
jar:file:/xxx/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.8.21/kotlin-stdlib-1.8.21.jar!/kotlin/time/TimeSource$Monotonic.class

`

Can you simply do as suggested by @rafalwrzeszcz in this now defunct thread: #2487 and create 2 distributions of DynamoDBLocal.jar

  • One uber jar with the embedded kotlin class overrides
  • One smaller without the kotlin classes

That would be very much appreciated ;)

Expected Behavior

I expect to be able to use DynamoDBLocal-2.X in a kotlin application that packages the kotlin-stdlib-X.jar in its class path for integration tests without running into this unrecoverable error:

Current Behavior

`
An attempt was made to call a method that does not exist. The attempt was made from the following location:

aws.smithy.kotlin.runtime.http.operation.SerializeHandler.call(SdkOperationExecution.kt:396)

The following method did not exist:

'long kotlin.time.TimeSource$Monotonic.markNow-z9LOYto()'

The calling method's class, aws.smithy.kotlin.runtime.http.operation.SerializeHandler, was loaded from the following location:

jar:file:/xxx/.m2/repository/aws/smithy/kotlin/http-client-jvm/0.22.1/http-client-jvm-0.22.1.jar!/aws/smithy/kotlin/runtime/http/operation/SerializeHandler.class

The called method's class, kotlin.time.TimeSource$Monotonic, is available from the following locations:

jar:file:/xxx/.m2/repository/com/amazonaws/DynamoDBLocal/2.0.0/DynamoDBLocal-2.0.0.jar!/kotlin/time/TimeSource$Monotonic.class
jar:file:/xxx/.m2/repository/org/jetbrains/kotlin/kotlin-stdlib/1.8.21/kotlin-stdlib-1.8.21.jar!/kotlin/time/TimeSource$Monotonic.class

`

Reproduction Steps

Build integration tests on a kotlin application that is dependant on kotlin-stdlib and on DynamoDBLocal

Possible Solution

As suggested by use @rafalwrzeszcz in this now defunct thread: #2487 :

Create 2 distributions of DynamoDBLocal.jar

  • One uber jar with the embedded kotlin class overrides
  • One smaller without the kotlin classes

Additional Information/Context

No response

AWS Java SDK version used

latest

JDK version used

java 17, Kotlin 1.8

Operating System and version

Mac OS 13.4

@vgiguere vgiguere added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 19, 2023
@debora-ito debora-ito added feature-request A feature should be added or improved. and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 24, 2023
@debora-ito
Copy link
Member

@vgiguere I'll reach out to the DynamoDB Local team.

But will close this issue, as there's no pending actions from the Java SDK team.

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please 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.

@vgiguere
Copy link
Author

vgiguere commented Jul 25, 2023

That's not a nice way to treat customers if you ask me.

Why close the issue instead of keeping me in the loop using this ticket?

There is no way to reach out to DynamoDBLocal team except through this repo and then you close the issue.
How am I, as a client, to get the attention of the DynamoDBLocal team?

@debora-ito
Copy link
Member

@vgiguere reopening.

I understand there's no channel of communication with the DynamoDB Local team. Every time we get a Github issue that is service related, we reach out to the service team.

I closed this issue because it's not a feature request for the Java SDK itself, so the decision to accept it does not depend on the Java SDK team. Getting a decision from the service teams can take time and we can't control it, so closing this issue means the Java SDK team doesn't have to monitor this indefinitely.

I'm ok with keeping this open until we get a response from the DynamoDB Local team saying if they will support it or not - but will not keep it open until the change is released, if they decide to support it. What do you think?

@vgiguere
Copy link
Author

vgiguere commented Jul 26, 2023

Thanks.

I appreciate your help @debora-ito .

To answer your question, I am perfectly fine with your idea of allowing the conversation but not tracking the work.
I don't want to clog up your ticket system ;)

Since you work at AWS, maybe you can submit to DynamoDBLocal team the idea of creating a forum/ticket system for their clients? It's an important tool for any company that is serious about testing DynamoDB access control/queries/repos etc. etc..

@debora-ito debora-ito changed the title (short issue description) DynamoDB Local conflicts with Kotlin Jul 26, 2023
@debora-ito
Copy link
Member

Just a reminder that you can talk to the service team if you have access to a Premium Support plan -
https://aws.amazon.com/premiumsupport/plans/developers/

With a Premium Support plan you'll work with a support engineer that is dedicated to your case, talk to the service team directly and have a faster turnaround between questions. But you probably know that.

@debora-ito debora-ito added dynamodb-local p3 This is a minor priority issue labels Aug 3, 2023
@vgiguere
Copy link
Author

Was there a response from DynamoDBLocal team?
Can they maybe engage here on this issue?

@chrscole
Copy link

@vgiguere Are you open for a discussion with the DynamoDB local team? You can reach us here: aws-workbench-feedback@amazon.com and we will find a time that works.

@debora-ito
Copy link
Member

There's a new channel of communication with the DynamoDB Local team, it's their own Github repo:
awslabs/amazon-dynamodb-local-samples

They are tracking this specific issue with Kotlin core libs in here: awslabs/amazon-dynamodb-local-samples#15. Please use this link to track progress going forward.

@debora-ito debora-ito closed this as not planned Won't fix, can't repro, duplicate, stale Jul 31, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamodb-local feature-request A feature should be added or improved. p3 This is a minor priority issue
Projects
None yet
Development

No branches or pull requests

3 participants