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

Add JMESPath support for DynamoDB's TransactGetItem #3948

Open
Velfi opened this issue Dec 20, 2024 · 0 comments
Open

Add JMESPath support for DynamoDB's TransactGetItem #3948

Velfi opened this issue Dec 20, 2024 · 0 comments

Comments

@Velfi
Copy link
Contributor

Velfi commented Dec 20, 2024

Currently, trying to build the model will result in:

Projection dynamodb failed: software.amazon.smithy.rust.codegen.client.smithy.generators.waiters.UnsupportedJmesPathException: Only projection expressions with flattens are supported by smithy-rs
Expression: "TransactItems"[*]."Get"."TableName"
software.amazon.smithy.rust.codegen.client.smithy.generators.waiters.UnsupportedJmesPathException: Only projection expressions with flattens are supported by smithy-rs
Expression: "TransactItems"[*]."Get"."TableName"
 at software.amazon.smithy.rust.codegen.client.smithy.generators.waiters.RustJmespathShapeTraversalGenerator.generate(RustJmespathShapeTraversalGenerator.kt:330)
 at software.amazon.smithy.rust.codegen.client.smithy.endpoint.generators.EndpointParamsInterceptorGenerator$paramSetters$1.invoke(EndpointParamsInterceptorGenerator.kt:163)
 at software.amazon.smithy.rust.codegen.client.smithy.endpoint.generators.EndpointParamsInterceptorGenerator$paramSetters$1.invoke(EndpointParamsInterceptorGenerator.kt:130)
 at software.amazon.smithy.rust.codegen.core.rustlang.RustWriter$RustSymbolFormatter.apply(RustWriter.kt:1002)
 at software.amazon.smithy.rust.codegen.core.rustlang.RustWriter$RustSymbolFormatter.apply(RustWriter.kt:971)
 at software.amazon.smithy.utils.AbstractCodeWriter.applyFormatter(AbstractCodeWriter.java:2023)
 at software.amazon.smithy.utils.CodeFormatter$Operation.lambda$formatted$1(CodeFormatter.java:108)
 at software.amazon.smithy.utils.CodeFormatter$BlockOperation$Unconditional.apply(CodeFormatter.java:228)
 at software.amazon.smithy.utils.CodeFormatter.run(CodeFormatter.java:41)
 at software.amazon.smithy.utils.AbstractCodeWriter.format(AbstractCodeWriter.java:1702)
 at software.amazon.smithy.utils.AbstractCodeWriter.write(AbstractCodeWriter.java:1761)
 at software.amazon.smithy.rust.codegen.core.rustlang.RustWriter.write(RustWriter.kt:669)
 at software.amazon.smithy.rust.codegen.core.rustlang.RustWriterKt$rustTemplate$1.invoke(RustWriter.kt:262)
 at software.amazon.smithy.rust.codegen.core.rustlang.RustWriterKt$rustTemplate$1.invoke(RustWriter.kt:261)
 at software.amazon.smithy.rust.codegen.core.rustlang.RustWriterKt.withTemplate(RustWriter.kt:120)
 at software.amazon.smithy.rust.codegen.core.rustlang.RustWriterKt.withTemplate$default(RustWriter.kt:106)
 at software.amazon.smithy.rust.codegen.core.rustlang.RustWriterKt.rustTemplate(RustWriter.kt:261)
 at software.amazon.smithy.rust.codegen.client.smithy.endpoint.generators.EndpointParamsInterceptorGenerator.render(EndpointParamsInterceptorGenerator.kt:85)
 at software.amazon.smithy.rust.codegen.client.smithy.generators.OperationGenerator.renderOperationStruct(OperationGenerator.kt:213)
 at software.amazon.smithy.rust.codegen.client.smithy.generators.OperationGenerator.renderOperation(OperationGenerator.kt:58)
 at software.amazon.smithy.rust.codegen.client.smithy.ClientCodegenVisitor$operationShape$1.invoke(ClientCodegenVisitor.kt:317)
 at software.amazon.smithy.rust.codegen.client.smithy.ClientCodegenVisitor$operationShape$1.invoke(ClientCodegenVisitor.kt:315)
 at software.amazon.smithy.rust.codegen.core.smithy.RustCrate.withModule$lambda$6(CodegenDelegator.kt:211)
 at software.amazon.smithy.codegen.core.WriterDelegator.useFileWriter(WriterDelegator.java:175)
 at software.amazon.smithy.rust.codegen.core.smithy.RustCrate.withModule(CodegenDelegator.kt:210)
 at software.amazon.smithy.rust.codegen.core.smithy.RustCrate.useShapeWriter(CodegenDelegator.kt:109)
 at software.amazon.smithy.rust.codegen.client.smithy.ClientCodegenVisitor.operationShape(ClientCodegenVisitor.kt:315)
 at software.amazon.smithy.rust.codegen.client.smithy.ClientCodegenVisitor.operationShape(ClientCodegenVisitor.kt:61)
 at software.amazon.smithy.model.shapes.OperationShape.accept(OperationShape.java:87)
 at software.amazon.smithy.rust.codegen.client.smithy.ClientCodegenVisitor.execute(ClientCodegenVisitor.kt:165)
 at software.amazon.smithy.rust.codegen.client.smithy.RustClientCodegenPlugin.executeWithDecorator(RustClientCodegenPlugin.kt:79)
 at software.amazon.smithy.rust.codegen.client.testutil.ClientDecoratableBuildPlugin.execute(ClientCodegenIntegrationTest.kt:61)
 at software.amazon.smithy.build.SmithyBuildImpl.applyPlugin(SmithyBuildImpl.java:432)
 at software.amazon.smithy.build.SmithyBuildImpl.applyProjection(SmithyBuildImpl.java:364)
 at software.amazon.smithy.build.SmithyBuildImpl.executeSerialProjection(SmithyBuildImpl.java:281)
 at software.amazon.smithy.build.SmithyBuildImpl.lambda$applyAllProjections$4(SmithyBuildImpl.java:201)
 at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
 at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625)
 at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
 at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
 at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
 at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
 at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
 at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
 at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
 at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: software.amazon.smithy.rust.codegen.client.smithy.generators.waiters.UnsupportedJmesPathException: Only projection expressions with flattens are supported by smithy-rs
 at software.amazon.smithy.rust.codegen.client.smithy.generators.waiters.RustJmespathShapeTraversalGenerator.generateProjection(RustJmespathShapeTraversalGenerator.kt:664)
 at software.amazon.smithy.rust.codegen.client.smithy.generators.waiters.RustJmespathShapeTraversalGenerator.generate(RustJmespathShapeTraversalGenerator.kt:311)
 ... 45 more

Talk to Zelda for info on where to get the updated model that triggers this build failure.

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

No branches or pull requests

1 participant