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

AWS SDK responses are not (can not?) be validated in Rust #751

Open
robin-aws opened this issue Dec 18, 2024 · 0 comments
Open

AWS SDK responses are not (can not?) be validated in Rust #751

robin-aws opened this issue Dec 18, 2024 · 0 comments
Labels
soundness Bugs that cause the generated code to compute the wrong value or crash

Comments

@robin-aws
Copy link
Contributor

robin-aws commented Dec 18, 2024

Follow up from #752 which disabled this in Rust.

The SDKs will produce values that violate constraints, such as a Some({}) on an optional map with @Length(min: 1). This could be considered an SDK bug since information is lost, SDKs are also not supposed to validate constraints, which makes it harder to argue it should be fixed. At the same time the types we generate for Dafny AWS SDKs assume these constraints are satisfied, so by not validating we are introducing unsoundness in the Dafny code.

The proper fix is likely a pretty big refactoring to distinguish which Dafny interfaces MUST assume constraints are satisfied (what the Smithy specification calls authoritative implementations) and which SHOULD NOT.

@robin-aws robin-aws added the soundness Bugs that cause the generated code to compute the wrong value or crash label Dec 18, 2024
@robin-aws robin-aws changed the title AWS SDK responses are not (can not?) be validated AWS SDK responses are not (can not?) be validated in Rust Dec 18, 2024
robin-aws added a commit that referenced this issue Dec 18, 2024
…#752)

See #751

Also bumps the Rust toolchain version since the SDKs require 1.81 now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
soundness Bugs that cause the generated code to compute the wrong value or crash
Projects
None yet
Development

No branches or pull requests

1 participant