-
Notifications
You must be signed in to change notification settings - Fork 2.8k
refactor: explicitly return at most one endpoint in generateTXTRecord
#5790
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
[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 @bachorp. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. |
generateTXTRecord
generateTXTRecord
I have a strong feeling this will recreate the records. Is there any way you can prove on a real cluster that this won't happen? |
Could you elaborate on that? I fail to see how such side effect would be possible. (Not to say that it shouldn't be tested, of course.) |
The change could have some cascading effects on records. Unit tests at the moment do not cover all the scenarios. |
/ok-to-test |
@bachorp We have enabled coveralls, so if you rebase this PR, you will see a comment on it with coverage information. There is also Makefile target to ease local run. |
Statements of changed functions not covered: |
What does it do ?
Changes
generateTXTRecord
to return exactly one endpoint ornil
(in case of error) instead of a list of endpoints.Motivation
This change will allow to keep TXT records generated for
updateOld
andupdateNew
aligned by construction. (Aligned meaning thatupdateOld[i]
corresponds toupdateNew[i]
.) Such alignment is not possible ifgenerateTXTRecord
returns an opaque list. See also #5681.More