Skip to content

Conversation

@danielmarbach
Copy link
Contributor

No description provided.

@danielmarbach
Copy link
Contributor Author

It seems the region endpoint discovery no longer throws an exception but returns "unknown" which causes one of the tests to fail. Stopping for now

@johnsimons
Copy link
Member

There is this method that deals with unknown regions https://github.com/aws/aws-sdk-net/blob/c74b20bd7ea3e4402479067e27bbb495f406e44b/sdk/src/Core/RegionEndpoint/RegionEndpoint.cs#L174
including China-unknown

This is required because RegionEndpoint.GetBySystemName() returns `unknown` instead of throwing.
@johnsimons
Copy link
Member

@danielmarbach, I pushed a commit to it to validate the region input beforehand.
Hopefully that does the trick 🤞

Comment on lines +118 to +121
if (!IsValidAwsRegion(sqsConnectionString.Region))
{
throw new ArgumentException("Invalid region endpoint provided");
}
Copy link
Member

Choose a reason for hiding this comment

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

I am unsure if we need this validation here, because i assume the connection string region would already be validated, @danielmarbach ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is validated by the SDK but not by us. It would throw a different exception though indicating an unknown name or host or something like that. This would at least keep the behavior consistent

@danielmarbach danielmarbach merged commit 90c2c46 into master May 30, 2025
32 checks passed
@danielmarbach danielmarbach deleted the sqs branch May 30, 2025 06:50
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