Skip to content

Don't rely on endpoint params region#6385

Closed
dagnir wants to merge 1 commit intomasterfrom
dongie/sigv4a-region-fix
Closed

Don't rely on endpoint params region#6385
dagnir wants to merge 1 commit intomasterfrom
dongie/sigv4a-region-fix

Conversation

@dagnir
Copy link
Copy Markdown
Contributor

@dagnir dagnir commented Aug 28, 2025

Motivation and Context

When generating the for the endpoint interceptor, don't assume that the
endpoint params contains a 'region' member; endpoint rulesets are not
required to have this parameter; in situations where the endpoint params
does not have this member, compilation fails.

For backwards compatibility, give the region endpoint params preference
if it exists; otherwise use the region from the execution attributes.

Modifications

Testing

  • new codegen 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

@dagnir dagnir force-pushed the dongie/sigv4a-region-fix branch 2 times, most recently from cc254ef to 8e68acd Compare August 28, 2025 20:19
@dagnir dagnir marked this pull request as ready for review August 28, 2025 20:19
@dagnir dagnir requested a review from a team as a code owner August 28, 2025 20:19
Comment thread .changes/next-release/bugfix-AWSSDKforJavav2-d0c7f24.json Outdated
When generating the for the endpoint interceptor, don't assume that the
endpoint params contains a 'region' member; endpoint rulesets are not
required to have this parameter; in situations where the endpoint params
does not have this member, compilation fails.

For backwards compatibility, give the region endpoint params preference
if it exists; otherwise use the region from the execution attributes.
@dagnir dagnir force-pushed the dongie/sigv4a-region-fix branch from 8e68acd to f280f60 Compare August 28, 2025 20:25
alextwoods
alextwoods previously approved these changes Aug 28, 2025
@sonarqubecloud
Copy link
Copy Markdown

@dagnir dagnir requested a review from alextwoods August 29, 2025 21:20
@dagnir
Copy link
Copy Markdown
Contributor Author

dagnir commented Aug 29, 2025

Realized there's a forwards compatibility issue if a service adds a region endpoint param in the future that does not use the AWS:Region builtin. Removed approval to prevent merging and will update with a more suitable fix.

@dagnir dagnir dismissed alextwoods’s stale review August 29, 2025 21:24

Reevaluating fix.

@dagnir
Copy link
Copy Markdown
Contributor Author

dagnir commented Sep 18, 2025

Closing this PR for now. Will revive once we settle on the solution as a team.

@dagnir dagnir closed this Sep 18, 2025
@github-actions
Copy link
Copy Markdown

This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants