• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kubernetes-sigs / external-dns / 25157195781
81%

Build:
DEFAULT BRANCH: master
Ran 30 Apr 2026 09:11AM UTC
Jobs 2
Files 155
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Apr 2026 09:09AM UTC coverage: 80.486% (+0.02%) from 80.466%
25157195781

push

github

web-flow
fix(awssd): use namespace-aware parsing for dotted service names (#6365)

* fix(awssd): use namespace-aware parsing for dotted service names

parseHostname splits at the first dot, which breaks when Cloud Map
service names contain dots (e.g. my-app.elb in namespace dev.local).
The naive split produces namespace=elb.dev.local instead of
namespace=dev.local, causing the record to be silently skipped.

Change parseHostname to accept known namespaces and use longest-suffix
matching, falling back to the original first-dot split when no
namespace matches for backward compatibility.

Signed-off-by: Andrew Moes <andrew@moes.dev>
Made-with: Cursor

* refactor(awssd): rename parseHostname to parseNamespace, eliminate redundant calls

- Rename parseHostname to parseNamespace returning only the namespace
  name (single string) since that is the only value changesByNamespaceID
  needs.
- Extract namespaceIDToName helper to build namespace ID-to-name map.
- Refactor submitCreates/submitDeletes to derive service names via
  TrimSuffix using the known namespace name from the map, eliminating
  two redundant parseHostname calls per endpoint.
- Add edge-case tests: trailing dot, hostname-equals-namespace, and
  single-label hostname.

Signed-off-by: Andrew Moes <andrew@moes.dev>
Made-with: Cursor

* refactor(awssd): make parseNamespace a package-level function

- Remove the AWSSDProvider receiver from parseNamespace since it has no
  dependency on the provider struct.
- Reorder file so all receiver methods precede package-level helpers.
- Update call site and test accordingly.

Signed-off-by: Andrew Moes <andrew@moes.dev>
Made-with: Cursor

* fix(awssd): strip trailing dot in parseNamespace for defense-in-depth

Callers already trim trailing dots before invoking parseNamespace, but
the function itself silently returns the wrong namespace when given a
FQDN with a trailing dot (strings.HasSuffix misses the match). Add a
defensive TrimSuffix at the top so parseNamespace i... (continued)

17220 of 21395 relevant lines covered (80.49%)

1465.54 hits per line

Coverage Regressions

Lines Coverage ∆ File
32
84.3
0.78% awssd/aws_sd.go
Jobs
ID Job ID Ran Files Coverage
1 run-ubuntu-latest - 25157195781.1 30 Apr 2026 09:16AM UTC 155
80.48
GitHub Action Run
2 run-macos-latest - 25157195781.2 30 Apr 2026 09:11AM UTC 155
80.49
GitHub Action Run
Source Files on build 25157195781
  • Tree
  • List 155
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25157195781
  • d37a8327 on github
  • Prev Build on master (#25156155629)
  • Next Build on master (#25159476230)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc