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

Fix constraint-related errors in Rpcv2CBOR server implementation #3794

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

drganjoo
Copy link
Contributor

This PR addresses issues with code generation related to constraints for the Rpcv2CBOR protocol.

Additionally, it introduces protocol-based model transformation on the server side. This transformation ensures that elements in the model not supported by Rpcv2CBOR, such as httpBinding related traits, are removed before code generation.

@drganjoo drganjoo added the server Rust server SDK label Aug 19, 2024
@drganjoo drganjoo requested review from a team as code owners August 19, 2024 14:50
Copy link

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • Server Test (ignoring whitespace)
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@ysaito1001
Copy link
Contributor

Can we add a changelog entry with applies_to: ["server", "client"] that announces the basic support for the protocol as part of this PR (FWIW, I've been able to call CloudWatch and Secrets Manager with RPC v2 CBOR)?

@drganjoo drganjoo marked this pull request as draft August 22, 2024 09:57
Copy link

github-actions bot commented Sep 4, 2024

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • Server Test (ignoring whitespace)
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Copy link

github-actions bot commented Sep 4, 2024

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • Server Test (ignoring whitespace)
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Copy link

github-actions bot commented Sep 4, 2024

A new generated diff is ready to view.

  • No codegen difference in the AWS SDK
  • No codegen difference in the Client Test
  • Server Test (ignoring whitespace)
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Copy link

github-actions bot commented Sep 8, 2024

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

github-actions bot commented Sep 9, 2024

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

github-actions bot commented Sep 9, 2024

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

github-actions bot commented Sep 9, 2024

A new generated diff is ready to view.

A new doc preview is ready to view.

@drganjoo drganjoo marked this pull request as ready for review September 9, 2024 14:18
Copy link

github-actions bot commented Sep 9, 2024

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link
Contributor

@david-perez david-perez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm; just a few nits

.changelog/2155171.md Outdated Show resolved Hide resolved
.changelog/2155171.md Outdated Show resolved Hide resolved
*/
fun loadSmithyConstraintsModel(): Pair<Model, ShapeId> {
val filePath = "../codegen-core/common-test-models/constraints.smithy"
val serviceShapeId = ShapeId.from("com.amazonaws.constraints#ConstraintsService")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you could expect it from the parsed model below instead of hardcoding it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have changed it to return the first service shape in the constraints file.

drganjoo and others added 6 commits September 17, 2024 13:20
Co-authored-by: david-perez <d@vidp.dev>
Co-authored-by: david-perez <d@vidp.dev>
…en/core/smithy/protocols/RpcV2Cbor.kt

Co-authored-by: david-perez <d@vidp.dev>
…en/core/testutil/EventStreamTestModels.kt

Co-authored-by: david-perez <d@vidp.dev>
Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Copy link

A new generated diff is ready to view.

A new doc preview is ready to view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client server Rust server SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants