Skip to content

[client] Add env var to skip DNS probing#5270

Merged
lixmal merged 1 commit intomainfrom
env-skip-dns-probe
Feb 9, 2026
Merged

[client] Add env var to skip DNS probing#5270
lixmal merged 1 commit intomainfrom
env-skip-dns-probe

Conversation

@lixmal
Copy link
Copy Markdown
Collaborator

@lixmal lixmal commented Feb 6, 2026

Describe your changes

Issue ticket number and link

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

New Features

  • DNS probing can now be skipped via environment variable configuration for advanced deployments that don't require DNS validation.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 6, 2026

📝 Walkthrough

Walkthrough

Modified DNS probing behavior to support environment-driven skipping. Added a public constant NB_SKIP_DNS_PROBE that, when set to a truthy value, causes the ProbeAvailability function to return early without performing DNS probing. Includes logging for invalid values and successful skip events.

Changes

Cohort / File(s) Summary
DNS Probing Configuration
client/internal/dns/server.go
Added public constant NB_SKIP_DNS_PROBE and conditional logic in ProbeAvailability to skip DNS probing when the environment variable is set to a truthy value. Includes warning logs for invalid boolean values and info logs when skipping occurs. Added imports for os and strconv.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

🐰 A little flag to skip the probe,
DNS rests in burrows so deep,
When NB_SKIP_DNS_PROBE is shown,
Through environment's door we creep,
Faster hops, no DNS to keep! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding an environment variable to skip DNS probing in the client.
Description check ✅ Passed The description follows the template structure with completed checklist items and documentation decision, but the 'Describe your changes' section lacks detail about what the env var does.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch env-skip-dns-probe

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@lixmal lixmal force-pushed the env-skip-dns-probe branch from 69d1561 to 178f57a Compare February 6, 2026 09:46
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 6, 2026

@lixmal lixmal merged commit 08403f6 into main Feb 9, 2026
38 checks passed
@lixmal lixmal deleted the env-skip-dns-probe branch February 9, 2026 10:09
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.

2 participants