Add --search-domains flag to dns options command#655
Conversation
Expose the supervisor's search_domains DNS option via the CLI, mirroring the existing --servers flag. Accepts multiple values via repeated use of the flag. ha dns options --search-domains example.com --search-domains corp.example.com
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a ChangesSearch domains flag addition
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@cmd/dns_options.go`:
- Around line 39-44: The code is calling log.WithField(...).Debug(...) but only
imports log/slog so replace the non-existent log usage with slog structured
logging: after obtaining searchDomains (from cmd.Flags().GetStringArray) remove
log.WithField and instead call slog.Debug or slog.Info with attributes (e.g.,
slog.Debug("search-domains", slog.Any("search-domains", searchDomains))) and
keep the conditional that sets options["search_domains"]; ensure you use
slog.Any or slog.Strings for the attribute and do not introduce a new "log"
identifier.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Expose the supervisor's search_domains DNS option (home-assistant/supervisor#6893) via the CLI, mirroring the existing --servers flag. Accepts multiple values via repeated use of the flag.
ha dns options --search-domains example.com --search-domains corp.example.com
Peer of home-assistant/supervisor#6893 and requires that PR first.
Summary by CodeRabbit
ha dns optionscommand now supports the--search-domainsflag to configure DNS search domains.