Skip to content

Conversation

ivankatliarchuk
Copy link
Contributor

@ivankatliarchuk ivankatliarchuk commented Jul 25, 2025

What does it do ?

  • We need custom idna profile in multiple locations
  • TXT records not deleted for idna affected records
  • records with * not handled correctly
  • for aws provider on DryRun added early return to reduce nesting

Follow-up most likely

Motivation

Fixes #5649
Fixes #5602

More

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

Current
Screenshot 2025-07-25 at 12 07 00

Screenshot 2025-07-25 at 12 42 31

With the fix

records added
Screenshot 2025-07-25 at 14 59 52

records deleted
Screenshot 2025-07-25 at 15 01 25

same for records with * and _
Screenshot 2025-07-25 at 12 44 02

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. internal Issues or PRs related to internal code labels Jul 25, 2025
@k8s-ci-robot k8s-ci-robot added plan Issues or PRs related to external-dns plan provider Issues or PRs related to a provider labels Jul 25, 2025
@ivankatliarchuk ivankatliarchuk marked this pull request as draft July 25, 2025 12:22
@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 25, 2025
@ivankatliarchuk ivankatliarchuk force-pushed the fix-idna-5649 branch 2 times, most recently from a4fe0fa to e1069df Compare July 25, 2025 15:14
Signed-off-by: ivan katliarchuk <[email protected]>
@ivankatliarchuk ivankatliarchuk marked this pull request as ready for review July 25, 2025 16:44
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 25, 2025
@ivankatliarchuk
Copy link
Contributor Author

Hi @a-pallari , @sathieu and @valerian-roche any chence to confirm the fix works?

If needed, see how to test a PR ?.

Copy link
Contributor

@valerian-roche valerian-roche left a comment

Choose a reason for hiding this comment

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

We use roughly the same fix successfully in our fork.
The main difference is the Profile becoming a shared, reused instance. The structure methods have pointer receiver but from a quick read of the code do not seem to alter it, so it should not be an issue

@k8s-ci-robot
Copy link
Contributor

@valerian-roche: changing LGTM is restricted to collaborators

In response to this:

We use roughly the same fix successfully in our fork.
The main difference is the Profile becoming a shared, reused instance. The structure methods have pointer receiver but from a quick read of the code do not seem to alter it, so it should not be an issue

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.

@sathieu
Copy link

sathieu commented Jul 26, 2025

Hi @a-pallari , @sathieu and @valerian-roche any chence to confirm the fix works?

@ivankatliarchuk I won't have the time to do e2e test, but I can confirm that this removes the error:

package main

import (
	"fmt"

	"golang.org/x/net/idna"
)

func main() {
	fmt.Println(idna.Lookup.ToUnicode("*.foo.example.org"))
	Profile := idna.New(
		idna.MapForLookup(),
		idna.Transitional(true),
		idna.StrictDomainName(false),
	)
	fmt.Println(Profile.ToUnicode("*.foo.example.org"))

}
*.foo.example.org idna: disallowed rune U+002A
*.foo.example.org <nil>

Program exited.

See on Go Playground

@ivankatliarchuk
Copy link
Contributor Author

#5649 (comment)

Hi @RichardoC you could try this fix and validate?

how to test a PR ?.

@mloiseleur
Copy link
Collaborator

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 29, 2025
@mloiseleur mloiseleur changed the title fix(idna): fix handling of domains fix(idna): handling of domains Jul 29, 2025
@mloiseleur mloiseleur changed the title fix(idna): handling of domains fix(idna): domains handling Jul 29, 2025
@mloiseleur mloiseleur changed the title fix(idna): domains handling fix(endpoint): domains handling with idna Jul 29, 2025
@RichardoC
Copy link

#5649 (comment)

Hi @RichardoC you could try this fix and validate?

how to test a PR ?.

Unfortunately not. The cluster where I see the issue isn't somewhere I can install unreleased software. Sorry!

@ivankatliarchuk
Copy link
Contributor Author

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ivankatliarchuk, valerian-roche

The full list of commands accepted by this bot can be found here.

The pull request process is described 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 29, 2025
@k8s-ci-robot k8s-ci-robot merged commit 0d1309c into kubernetes-sigs:master Jul 29, 2025
14 checks passed
@ivankatliarchuk ivankatliarchuk deleted the fix-idna-5649 branch July 29, 2025 10:57
troll-os pushed a commit to FiligranHQ/external-dns that referenced this pull request Aug 28, 2025
* fix(idna): fix handling of domains

Signed-off-by: ivan katliarchuk <[email protected]>

* fix(idna): fix handling of domains

Signed-off-by: ivan katliarchuk <[email protected]>

* fix(idna): fix handling of domains

Signed-off-by: ivan katliarchuk <[email protected]>

---------

Signed-off-by: ivan katliarchuk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. internal Issues or PRs related to internal code lgtm "Looks good to me", indicates that a PR is ready to be merged. plan Issues or PRs related to external-dns plan provider Issues or PRs related to a provider size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
6 participants