Skip to content

fix(civo): normalize @ apex record names#6184

Open
cjohnhanson wants to merge 1 commit intokubernetes-sigs:masterfrom
cjohnhanson:fix/civo-apex-record-matching
Open

fix(civo): normalize @ apex record names#6184
cjohnhanson wants to merge 1 commit intokubernetes-sigs:masterfrom
cjohnhanson:fix/civo-apex-record-matching

Conversation

@cjohnhanson
Copy link

@cjohnhanson cjohnhanson commented Feb 10, 2026

What does it do ?

Normalizes "@" apex record names from the Civo DNS API to empty strings,
matching the provider's existing convention for root domain records.

Motivation

The Civo API returns "@" as the name for apex DNS records. The provider
expected "", causing Records() to construct names like @.example.com
and getRecordID() to fail matching existing records. This resulted in
database_dns_record_already_exist errors on every sync loop.

Confirmed via live Civo API calls — all apex records return "name": "@".

Related: #6183

More

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

@k8s-ci-robot k8s-ci-robot added the provider Issues or PRs related to a provider label Feb 10, 2026
@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 ivankatliarchuk for approval. For more information see the Code Review Process.

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

Details 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

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 10, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: cjohnhanson / name: Cody J. Hanson (f56b462)

@k8s-ci-robot
Copy link
Contributor

Welcome @cjohnhanson!

It looks like this is your first PR to kubernetes-sigs/external-dns 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/external-dns has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 10, 2026
@k8s-ci-robot
Copy link
Contributor

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

Details

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 cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 10, 2026
@cjohnhanson cjohnhanson marked this pull request as draft February 10, 2026 03:34
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 10, 2026
@cjohnhanson cjohnhanson force-pushed the fix/civo-apex-record-matching branch from 8d4d93a to f3b047b Compare February 10, 2026 03:34
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Feb 10, 2026
The Civo DNS API may return "@" as the record name for apex (root)
domain records. The provider only handled the empty string case,
causing apex records to be unrecognized during reconciliation. This
led to repeated "database_dns_record_already_exist" errors on every
sync loop as the provider attempted to re-create records it couldn't
find.

Normalize "@" to "" in both Records() and getRecordID().

Related: kubernetes-sigs#6183
Signed-off-by: Cody J. Hanson <cody@codyjhanson.com>
@cjohnhanson cjohnhanson force-pushed the fix/civo-apex-record-matching branch from f3b047b to f56b462 Compare February 10, 2026 03:53
@cjohnhanson cjohnhanson changed the title fix(civo): normalize "@" apex record names to empty string fix(civo): normalize @ apex record names Feb 10, 2026
@cjohnhanson cjohnhanson marked this pull request as ready for review February 10, 2026 03:55
@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 Feb 10, 2026
Copy link
Member

@ivankatliarchuk ivankatliarchuk left a comment

Choose a reason for hiding this comment

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

Can you confirm that this PR fixes your issue. Something similar expected #5085 (comment).

// translated to zone name for the endpoint entry.
if r.Name == "" {
// The Civo API may return "@" for apex records instead of "".
if r.Name == "" || r.Name == "@" {
Copy link
Member

Choose a reason for hiding this comment

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

Is this not suppose to be for A and AAAA only based on explanation in the issue?

@ivankatliarchuk
Copy link
Member

/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. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 10, 2026
@coveralls
Copy link

Pull Request Test Coverage Report for Build 21851017585

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 79.256%

Totals Coverage Status
Change from base Build 21559764040: 0.1%
Covered Lines: 16093
Relevant Lines: 20305

💛 - Coveralls

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. provider Issues or PRs related to a provider size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants