[PR #820] [MERGED] Drop Rego use manual code to calculate network map #14330

Open
opened 2026-08-05 02:09:48 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/820
Author: @gigovich
Created: 4/19/2023
Status: Merged
Merged: 4/21/2023
Merged by: @gigovich

Base: feat-linux-firewall-supportHead: fix-peer-map-calculation


📝 Commits (5)

  • 11c5817 Calculate peer network map manually
  • aee9611 Drop Rego, migrate to manual code
  • 37fb495 Fix map calculation add more precise test for this case
  • 03f8534 Refactor peers connection resources generation function
  • c3650e9 Clear dependencies

📊 Changes

16 files changed (+313 additions, -487 deletions)

View changed files

📝 go.mod (+2 -10)
📝 go.sum (+5 -33)
📝 management/server/account.go (+1 -1)
📝 management/server/account_test.go (+0 -4)
📝 management/server/file_store_test.go (+0 -3)
📝 management/server/http/policies_handler.go (+0 -9)
📝 management/server/http/rules_handler.go (+0 -4)
📝 management/server/http/rules_handler_test.go (+0 -3)
📝 management/server/peer.go (+2 -95)
📝 management/server/peer_test.go (+0 -4)
📝 management/server/policy.go (+96 -225)
📝 management/server/policy_test.go (+205 -37)
management/server/rego/default_policy.rego (+0 -16)
management/server/rego/default_policy_module.rego (+0 -35)
📝 management/server/route_test.go (+0 -2)
📝 management/server/rule.go (+2 -6)

📄 Description

Describe your changes

Remove Rego engine to calculate network map and peer firewall rules for peer.

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)
  • Extended the README / documentation, if necessary

🔄 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/820 **Author:** [@gigovich](https://github.com/gigovich) **Created:** 4/19/2023 **Status:** ✅ Merged **Merged:** 4/21/2023 **Merged by:** [@gigovich](https://github.com/gigovich) **Base:** `feat-linux-firewall-support` ← **Head:** `fix-peer-map-calculation` --- ### 📝 Commits (5) - [`11c5817`](https://github.com/netbirdio/netbird/commit/11c5817377ca188a490b01cad923000dafb7c658) Calculate peer network map manually - [`aee9611`](https://github.com/netbirdio/netbird/commit/aee9611b3b852e7c2e7476933768a16ea2434a8e) Drop Rego, migrate to manual code - [`37fb495`](https://github.com/netbirdio/netbird/commit/37fb495df8bcece455d482477f87c20775a994fd) Fix map calculation add more precise test for this case - [`03f8534`](https://github.com/netbirdio/netbird/commit/03f853487109aa6170a285d1310fedd2c3655975) Refactor peers connection resources generation function - [`c3650e9`](https://github.com/netbirdio/netbird/commit/c3650e918ed16e0652216b5d5da953d00401a1d3) Clear dependencies ### 📊 Changes **16 files changed** (+313 additions, -487 deletions) <details> <summary>View changed files</summary> 📝 `go.mod` (+2 -10) 📝 `go.sum` (+5 -33) 📝 `management/server/account.go` (+1 -1) 📝 `management/server/account_test.go` (+0 -4) 📝 `management/server/file_store_test.go` (+0 -3) 📝 `management/server/http/policies_handler.go` (+0 -9) 📝 `management/server/http/rules_handler.go` (+0 -4) 📝 `management/server/http/rules_handler_test.go` (+0 -3) 📝 `management/server/peer.go` (+2 -95) 📝 `management/server/peer_test.go` (+0 -4) 📝 `management/server/policy.go` (+96 -225) 📝 `management/server/policy_test.go` (+205 -37) ➖ `management/server/rego/default_policy.rego` (+0 -16) ➖ `management/server/rego/default_policy_module.rego` (+0 -35) 📝 `management/server/route_test.go` (+0 -2) 📝 `management/server/rule.go` (+2 -6) </details> ### 📄 Description ## Describe your changes Remove Rego engine to calculate network map and peer firewall rules for peer. ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [x] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <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 02:09:48 -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#14330