Skip to content

Add the debug-bundle upload destination to the Clients settings - #800

Open
riccardomanfrin wants to merge 2 commits into
mainfrom
debug_upload_url
Open

riccardomanfrin wants to merge 2 commits into
mainfrom
debug_upload_url

Conversation

@riccardomanfrin

@riccardomanfrin riccardomanfrin commented Sep 11, 2026

Copy link
Copy Markdown

Exposes the debug_bundle_upload_url account setting added in netbirdio/netbird#7514 as a Debug Bundle Upload field under Settings > Clients.

A debug bundle carries peer logs, routes, DNS and firewall state, so the destination decides whose infrastructure that data lands on. Until now every client path that uploaded one without a human picking a destination sent it to the service NetBird runs, with no way for a self-hosted operator to point it elsewhere.

Empty keeps the current behaviour — peers upload to NetBird's service — so nothing changes for an account that leaves it alone. The URL is validated as https-with-host on the client too, matching what the API accepts: the peer fetches an upload URL from this endpoint and then PUTs the bundle to whatever comes back, so a plaintext hop would expose both.

Docs: netbirdio/docs#971.

Summary by CodeRabbit

  • New Features
    • Added a client setting for configuring a debug bundle upload URL.
    • Added validation requiring a non-empty HTTPS URL with a valid hostname.
    • Added guidance text and prevented saving when the URL is invalid.

A debug bundle carries peer logs, routes, DNS and firewall state, and until now
every client path that uploads one without a human picking a destination sent it
to the service NetBird runs, with no way for a self-hosted operator to point it
elsewhere. netbirdio/netbird publishes the destination to peers from the account
settings; this exposes that setting.

Empty keeps the current behaviour for cloud accounts and, for a self-hosted
deployment, makes the peers keep the bundle locally instead. The URL is
validated as https-with-host on the client too, matching what the API accepts:
the peer fetches an upload URL from this endpoint and then PUTs the bundle to
whatever comes back, so a plaintext hop would expose both.
The client no longer keeps the bundle on the peer when a self-hosted deployment
publishes no destination: netbirdio/netbird now falls back to the upload service
NetBird runs for every deployment, so the field's help text described behaviour
that is not there.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: d33ca62c-6cef-4c8a-be12-b27ef27d0bb0

📥 Commits

Reviewing files that changed from the base of the PR and between 6a85748 and b786c33.

📒 Files selected for processing (2)
  • src/interfaces/Account.ts
  • src/modules/settings/ClientSettingsTab.tsx

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The client settings now support a configurable debug bundle upload URL. The setting is typed in account data, validated as HTTPS, included in save operations, and exposed through a permission-aware input field.

Changes

Debug bundle upload settings

Layer / File(s) Summary
Settings contract and persistence
src/interfaces/Account.ts, src/modules/settings/ClientSettingsTab.tsx
The account settings interface now includes debug_bundle_upload_url. The client settings flow tracks, saves, and resets this value.
Validation and settings UI
src/modules/settings/ClientSettingsTab.tsx
The settings tab validates HTTPS URLs with hostnames, blocks invalid saves, and renders a permission-aware input with help text and validation errors.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: heisbrot

Merge Risk: ⚪ Minimal · up to b786c

The debug bundle upload setting validates HTTPS destinations, preserves empty-value fallback behavior, and is persisted through the settings flow. No merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding the debug-bundle upload destination to Client settings.
Description check ✅ Passed The description explains the setting, its behavior, validation, security impact, and documentation reference. It omits the required issue ticket section and explicit documentation checkbox from the re…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch debug_upload_url

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

A rabbit set a URL bright,
With HTTPS guarding it right.
The settings now save,
And errors behave,
While debug bundles hop into flight.

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

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