Skip to content

NAMECHEAP: fix support for url etc records #3538

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

Merged
merged 3 commits into from
May 3, 2025

Conversation

willpower232
Copy link
Collaborator

@willpower232 willpower232 commented Apr 18, 2025

Resolves #3522

The custom record types URL, URL301, and FRAME can be created by the current version of dnscontrol but they cannot be read by subsequent calls.

It looks like the previous iteration of how things work defaulted to record.SetTarget whereas the current way relies on record.PopulateFromString which does not have support for the custom record types.

This small change appears to do the trick to resolve the problem, the type specified from the users config file makes it way to the commands to create the records no problem.

I am not sure how to write tests for this since it would be namecheap specific? It looks like vultr also supports the records but I do not have a vultr account to confirm if it currently works or not.

P.S. I edited the file in github, not sure why it is showing as unverified by maybe thats just github being silly.

P.P.S. now showing as verified, github silliness confirmed

@tlimoncelli
Copy link
Contributor

Thanks for finding and fixing this bug!

You can add integration tests that are specific to a provider with the only() function. For example...

testgroup("PORKBUN_URLFWD tests",

		// PORKBUN features

		testgroup("PORKBUN_URLFWD tests",
			only("PORKBUN"),
			tc("Add a urlfwd", porkbunUrlfwd("urlfwd1", "http://example.com", "", "", "")),
			tc("Update a urlfwd", porkbunUrlfwd("urlfwd1", "http://example.org", "", "", "")),
			tc("Update a urlfwd with metadata", porkbunUrlfwd("urlfwd1", "http://example.org", "permanent", "no", "no")),
		),

@labrown
Copy link
Contributor

labrown commented Apr 20, 2025

I can confirm this change fixes my issue. Thanks!

@willpower232
Copy link
Collaborator Author

tests working nicely, thanks for the steer @tlimoncelli

@tlimoncelli tlimoncelli changed the title namecheap fix support for url etc records NAMECHEAP: fix support for url etc records May 3, 2025
@tlimoncelli tlimoncelli merged commit 03932c9 into StackExchange:main May 3, 2025
3 checks passed
@willpower232 willpower232 deleted the patch-2 branch May 5, 2025 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Namecheap URL301 records parsing problem
4 participants