-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix(aws): incorrect behavior for non-aliasable record types #6017
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: u-kai <[email protected]>
Signed-off-by: u-kai <[email protected]>
Signed-off-by: u-kai <[email protected]>
Signed-off-by: u-kai <[email protected]>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Hi @u-kai. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Refactoring and bug fix in single PR. Too risky. As well as for bug, it should be manifests provided to reproduce |
|
@ivankatliarchuk To make the existing issue easier to fix, I’ve opened a separate PR with the refactoring work. It would be great if you could review the refactoring PR first. Thanks! |
What does it do?
This PR refactors the alias-handling logic inside
adjustEndpointAndNewAaaaIfNeededand fixes incorrect behavior for record types that do not support AWS Alias records (e.g., MX, TXT, SRV, etc.).The work was performed in several steps to ensure correctness:
Extracted the alias-handling logic
to make the behavior easier to reason about and test.
Added temporary compatibility tests
to verify that the refactored logic produced identical results to the previous implementation.
After confirming functional parity, applied fixes
so that non-aliasable record types no longer receive alias-related modifications.
Added comprehensive tests
covering A / AAAA / CNAME alias behavior and non-aliasable record types.
Removed the temporary compatibility tests and old logic
once correctness and stability were fully validated.
As a result, the final codebase contains the refactored logic and the new test suite, while the transitional scaffolding used to guarantee correctness has been removed.
Motivation
This work originated from the discussion here:
#5997 (comment)
During the investigation, I found that:
To address this safely, I followed a staged approach:
More