Skip to content

Update non-streaming error unmarshalling to use new mapping function #5991

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

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

S-Saranya1
Copy link
Contributor

@S-Saranya1 S-Saranya1 commented Mar 25, 2025

Update non-streaming error unmarshalling to use new mapping function.

Motivation and Context

This change updates the non-streaming error unmarshalling to use the same mapping function that was previously implemented for streaming operations. This change deprecates BaseAwsJsonProtocolFactory#createErrorResponseHandler(JsonOperationMetadata). We have switched all usages in generated code to the replacement, createErrorResponseHandler(JsonOperationMetadata,Function).

Modifications

  • Updated non-streaming error unmarshalling to use exceptionMetadataMapper
  • Removed registerModeledException calls from initProtocolFactory
  • Updated codegen test files to match new exception mapping implementation

Testing

  • Added a test in kinesis service and verified it unmarshalled correctly
  • Ran integration tests

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@S-Saranya1 S-Saranya1 requested a review from a team as a code owner March 25, 2025 23:27
@davidh44
Copy link
Contributor

davidh44 commented Apr 7, 2025

Changes look good, but looks like existing Kinesis unit tests are failing, can we fix those?


import static org.junit.Assert.assertEquals;

public class KinesisExceptionTest {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use mock tests intead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, updated the tests accordingly.

Copy link
Contributor

Choose a reason for hiding this comment

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

Now that it's mock tests, can we move to test module instead of 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.

Done, moved it to the test module.

@@ -202,4 +202,4 @@ public AwsQueryProtocolFactory build() {
return new AwsQueryProtocolFactory(this);
}
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can we avoid updating files that don't have meaningful change?

@S-Saranya1 S-Saranya1 force-pushed the somepal/update-nonstreaming-error-unmarshaller branch from 1ba606b to e687576 Compare April 8, 2025 23:13
@S-Saranya1 S-Saranya1 force-pushed the somepal/update-nonstreaming-error-unmarshaller branch from e687576 to 6079584 Compare April 9, 2025 08:50
Fred1155 and others added 10 commits April 9, 2025 16:53
…TP connectors user-experience: 1) Customers can self-serve concurrent connections setting for their connectors, and 2) Customers can discover the public host key of remote servers using their SFTP connectors.
…puHours field in each TableOptimizerRun, providing clients visibility to the DPU-hours used for billing in managed Apache Iceberg table compaction optimization.
…'s Severity, CreateTime, and Identifier for a control's Implementation. The ListControls API now surfaces a control's Behavior, Severity, CreateTime, and Identifier for a control's Implementation.
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

Successfully merging this pull request may close these issues.

4 participants