[PR #5565] [MERGED] [management] removed legacy network map code #23301

Closed
opened 2026-08-05 06:07:03 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/5565
Author: @crn4
Created: 3/10/2026
Status: Merged
Merged: 4/27/2026
Merged by: @crn4

Base: mainHead: nmap/cleanup


📝 Commits (8)

  • 30dbf21 [management] removed legacy network map code
  • 710f6a9 add more tests
  • 5e097be linter
  • 86de658 Merge branch 'main' into nmap/cleanup
  • 74a9842 removed experimental cached network map code
  • da41a94 Merge branch 'main' into nmap/cleanup
  • 5e2d938 Merge branch 'main' into nmap/cleanup
  • 8538a54 merge main

📊 Changes

16 files changed (+807 additions, -5404 deletions)

View changed files

📝 management/internals/controllers/network_map/controller/controller.go (+18 -251)
📝 management/internals/controllers/network_map/interface.go (+0 -3)
📝 management/server/account_test.go (+1 -97)
📝 management/server/http/handlers/peers/peers_handler.go (+1 -1)
📝 management/server/peer_test.go (+0 -11)
📝 management/server/route_test.go (+0 -245)
📝 management/server/store/sql_store.go (+0 -2)
📝 management/server/types/account.go (+0 -403)
📝 management/server/types/account_test.go (+0 -399)
management/server/types/holder.go (+0 -47)
management/server/types/networkmap.go (+0 -67)
management/server/types/networkmap_comparison_test.go (+0 -592)
📝 management/server/types/networkmap_components.go (+0 -2)
management/server/types/networkmap_components_test.go (+787 -0)
management/server/types/networkmap_golden_test.go (+0 -967)
management/server/types/networkmapbuilder.go (+0 -2317)

📄 Description

Describe your changes

removal of an old unused code of legacy network map calculation

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)

removal of an unused code

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

  • Refactor

    • Network map behavior unified to a single component-based approach; legacy/experimental/compacted modes and related branching removed, simplifying peer/network map generation and update flows.
  • Tests

    • Removed legacy golden tests and benchmarks for the old map builder.
    • Added a comprehensive component-focused test suite covering connectivity, routing, firewall rules, posture checks, DNS, SSH, and related scenarios.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/5565 **Author:** [@crn4](https://github.com/crn4) **Created:** 3/10/2026 **Status:** ✅ Merged **Merged:** 4/27/2026 **Merged by:** [@crn4](https://github.com/crn4) **Base:** `main` ← **Head:** `nmap/cleanup` --- ### 📝 Commits (8) - [`30dbf21`](https://github.com/netbirdio/netbird/commit/30dbf21735ef0d8adc054050662380cf78538afb) [management] removed legacy network map code - [`710f6a9`](https://github.com/netbirdio/netbird/commit/710f6a9b76969c47dac6faaeb51bac48fe335500) add more tests - [`5e097be`](https://github.com/netbirdio/netbird/commit/5e097beec07556189228bb37286fe9d1532c21a0) linter - [`86de658`](https://github.com/netbirdio/netbird/commit/86de658b3a771e22312034681bba99183cf67f6e) Merge branch 'main' into nmap/cleanup - [`74a9842`](https://github.com/netbirdio/netbird/commit/74a9842866244f3450e069bb3e780f8c42ce4177) removed experimental cached network map code - [`da41a94`](https://github.com/netbirdio/netbird/commit/da41a94ead2f0102e1952eddee96fcab752d67e3) Merge branch 'main' into nmap/cleanup - [`5e2d938`](https://github.com/netbirdio/netbird/commit/5e2d938a9c51219eebf574a1906ef876ba98d8fb) Merge branch 'main' into nmap/cleanup - [`8538a54`](https://github.com/netbirdio/netbird/commit/8538a54d81386b8233f46634985bf07282f8f9bb) merge main ### 📊 Changes **16 files changed** (+807 additions, -5404 deletions) <details> <summary>View changed files</summary> 📝 `management/internals/controllers/network_map/controller/controller.go` (+18 -251) 📝 `management/internals/controllers/network_map/interface.go` (+0 -3) 📝 `management/server/account_test.go` (+1 -97) 📝 `management/server/http/handlers/peers/peers_handler.go` (+1 -1) 📝 `management/server/peer_test.go` (+0 -11) 📝 `management/server/route_test.go` (+0 -245) 📝 `management/server/store/sql_store.go` (+0 -2) 📝 `management/server/types/account.go` (+0 -403) 📝 `management/server/types/account_test.go` (+0 -399) ➖ `management/server/types/holder.go` (+0 -47) ➖ `management/server/types/networkmap.go` (+0 -67) ➖ `management/server/types/networkmap_comparison_test.go` (+0 -592) 📝 `management/server/types/networkmap_components.go` (+0 -2) ➕ `management/server/types/networkmap_components_test.go` (+787 -0) ➖ `management/server/types/networkmap_golden_test.go` (+0 -967) ➖ `management/server/types/networkmapbuilder.go` (+0 -2317) </details> ### 📄 Description ## Describe your changes removal of an old unused code of legacy network map calculation ## Issue ticket number and link ## Stack <!-- branch-stack --> ### Checklist - [x] 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](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) removal of an unused code ### 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/__ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Network map behavior unified to a single component-based approach; legacy/experimental/compacted modes and related branching removed, simplifying peer/network map generation and update flows. * **Tests** * Removed legacy golden tests and benchmarks for the old map builder. * Added a comprehensive component-focused test suite covering connectivity, routing, firewall rules, posture checks, DNS, SSH, and related scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 06:07:03 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#23301