Skip to content

fix: defaults to ip unless fqdn - #2370

Merged
frankiejol merged 2 commits into
mainfrom
fix/2369_fqdn
Oct 21, 2026
Merged

frankiejol merged 2 commits into
mainfrom
fix/2369_fqdn

Conversation

@frankiejol

Copy link
Copy Markdown
Member

fixes #2369

Copilot AI balanced review requested due to automatic review settings October 21, 2026 11:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Deterministic regression coverage is needed because the existing assertions depend on the runner’s DNS configuration.

1 open issue
What changed in this PR

Addresses #2369 by using the display IP when the resolved hostname lacks a dot, avoiding single-label hostnames that remote clients cannot resolve.

Changes:

  • Adds an IP fallback for single-label hostnames.
  • Updates the display test helper’s expected value.
File Description
t/​vm/​23_display.t Aligns expected hostnames with the IP fallback.
lib/​Ravada/​Domain.pm Rejects single-label resolved display hostnames.

Review effort: Balanced

Comment thread t/vm/23_display.t Outdated
Comment on lines +181 to +183
return $hostname if $hostname =~ /\./;

return $ip;

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The test helper aborts on short hostnames instead of validating the intended IP fallback.

2 open issues

Review effort: Balanced

Comment thread t/vm/23_display.t
return $hostname;
return $hostname if $hostname =~ /\./;

die "Error: I cant get a fqdn of $ip";
@frankiejol
frankiejol merged commit 2399737 into main Oct 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display IP not fqdn

2 participants