Skip to content

Conversation

bachorp
Copy link
Contributor

@bachorp bachorp commented Sep 1, 2025

What does it do ?

Changes generateTXTRecord to return exactly one endpoint or nil (in case of error) instead of a list of endpoints.

Motivation

This change will allow to keep TXT records generated for updateOld and updateNew aligned by construction. (Aligned meaning that updateOld[i] corresponds to updateNew[i].) Such alignment is not possible if generateTXTRecord returns an opaque list. See also #5681.

More

  • Yes, this PR title follows Conventional Commits
  • Yes, I added unit tests
  • Yes, I updated end user documentation accordingly

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign szuecs for approval. For more information see the Code Review Process.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added registry Issues or PRs related to a registry cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 1, 2025
@k8s-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 1, 2025
@mloiseleur mloiseleur changed the title refactor: Explicitly return at most one endpoint in generateTXTRecord refactor: explicitly return at most one endpoint in generateTXTRecord Sep 2, 2025
@ivankatliarchuk
Copy link
Contributor

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?

@bachorp
Copy link
Contributor Author

bachorp commented Sep 2, 2025

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.)

@ivankatliarchuk
Copy link
Contributor

The change could have some cascading effects on records. Unit tests at the moment do not cover all the scenarios.

@ivankatliarchuk
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 24, 2025
@mloiseleur
Copy link
Collaborator

@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.

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 1, 2025
@bachorp
Copy link
Contributor Author

bachorp commented Oct 1, 2025

Statements of changed functions not covered:

v1alpha1_ Go Coverage Report.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. registry Issues or PRs related to a registry size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants