You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lookup operation shape ID by searching the ServiceShape::getAllOperations
Support a qualified shaped ID
add a new parameter to set operation namespace
Stack traces
When shape is not in same namespace
Projection foo-client failed: software.amazon.smithy.model.node.ExpectationNotMetException: Shape not found in model: their.namespace#ListFoo
software.amazon.smithy.model.node.ExpectationNotMetException: Shape not found in model: their.namespace#ListFoo
at software.amazon.smithy.model.Model.lambda$expectShape$1(Model.java:713)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at software.amazon.smithy.model.Model.expectShape(Model.java:713)
at software.amazon.smithy.model.Model.expectShape(Model.java:729)
at software.amazon.smithy.rustsdk.endpoints.OperationInputTestGenerator$operationInvocation$1.invoke(OperationInputTestGenerator.kt:186)
at software.amazon.smithy.rustsdk.endpoints.OperationInputTestGenerator$operationInvocation$1.invoke(OperationInputTestGenerator.kt:183)
at software.amazon.smithy.rust.codegen.core.rustlang.RustWriter$RustSymbolFormatter.apply(RustWriter.kt:794)
at software.amazon.smithy.rust.codegen.core.rustlang.RustWriter$RustSymbolFormatter.apply(RustWriter.kt:767)
at software.amazon.smithy.utils.AbstractCodeWriter.applyFormatter(AbstractCodeWriter.java:1989)
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:1673)
at software.amazon.smithy.utils.AbstractCodeWriter.write(AbstractCodeWriter.java:1732)
at software.amazon.smithy.rust.codegen.core.rustlang.RustWriter.write(RustWriter.kt:515)
at software.amazon.smithy.rust.codegen.core.rustlang.RustWriterKt$rustTemplate$1.invoke(RustWriter.kt:238)
at software.amazon.smithy.rust.codegen.core.rustlang.RustWriterKt$rustTemplate$1.invoke(RustWriter.kt:237)
at software.amazon.smithy.rust.codegen.core.rustlang.RustWriterKt.withTemplate(RustWriter.kt:111)
at software.amazon.smithy.rust.codegen.core.rustlang.RustWriterKt.withTemplate$default(RustWriter.kt:97)
at software.amazon.smithy.rust.codegen.core.rustlang.RustWriterKt.rustTemplate(RustWriter.kt:237)
at software.amazon.smithy.rustsdk.endpoints.OperationInputTestGenerator$generateInput$1$1.invoke(OperationInputTestGenerator.kt:139)
at software.amazon.smithy.rustsdk.endpoints.OperationInputTestGenerator$generateInput$1$1.invoke(OperationInputTestGenerator.kt:138)
The text was updated successfully, but these errors were encountered:
…2782)
## Motivation and Context
Addresses #2767
This fixes an issue for users who write endpoint tests that rely on an
operation and service shape from different namespaces.
## Description
Instead of assuming operation namespace matches service namespace,
## Testing
`./gradlew :aws:sdk-codegen:test`
----
_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
---------
Co-authored-by: Zelda Hessler <[email protected]>
I'm trying to use
smithy.rules#endpointTests
, but running into an errorExpectationNotMetException: Shape not found in model
.My model looks like this
My endpoint test looks like this
Root cause
It seems the root cause is an assumption here that operation is in the same namespace as the service object.
https://github.com/awslabs/smithy-rs/blob/8e37d42f3cc01da7b3d8efd9ff3433d564d4debf/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/endpoints/OperationInputTestGenerator.kt#L125-L126
Suggestions
Stack traces
When shape is not in same namespace
The text was updated successfully, but these errors were encountered: