Fix DNS not supporting wildcard matching#13158
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
localstack-bot
left a comment
There was a problem hiding this comment.
Welcome to LocalStack! Thanks for raising your first Pull Request and landing in your contributions. Our team will reach out with any reviews or feedbacks that we have shortly. We recommend joining our Slack Community and share your PR on the #community channel to share your contributions with us. Please make sure you are following our contributing guidelines and our Code of Conduct.
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 2h 41m 45s ⏱️ Results for commit 17122ad. |
|
I have read the CLA Document and I hereby sign the CLA |
dfangl
left a comment
There was a problem hiding this comment.
Looks good! Nice and clean implementation and an added test!
Motivation
The LocalStack DNS service doesn't support wildcards in aliases. In such cases, the DNS will not resolve the query to the record it points to.
For example, given the following DNS configuration:
See the following pseudo-output:
After the fix, the output is as follows:
Changes
It refactors the alias resolution from raw string comparison in favor of a pattern matching comparison by reusing the
DNSLabel.matchWildcardmethod.