[PR #6785] [management] Ensure reverse proxy target IDs auto-increment #27048

Open
opened 2026-08-05 07:08:08 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/6785
Author: @CoderSufiyan
Created: 7/15/2026
Status: 🔄 Open

Base: mainHead: fix/issue-6007-target-id


📝 Commits (1)

  • 16be815 [management] Ensure reverse proxy target IDs auto-increment

📊 Changes

2 files changed (+4 additions, -1 deletions)

View changed files

📝 management/internals/modules/reverseproxy/service/service.go (+1 -1)
📝 management/server/store/sql_store_test.go (+3 -0)

📄 Description

Describe your changes

Explicitly mark reverse-proxy target IDs as auto-incrementing in the GORM model. Add a regression assertion that a saved reverse-proxy target receives a database-generated ID.

Fixes #6007

Stack

  • This PR is independent

Checklist

  • I have performed a self-review of my own code
  • I have tested the changes locally
  • I have added or updated tests where applicable
  • I have checked for breaking changes

Documentation

  • Documentation is not needed

Validation

  • go test ./management/server/store ./management/internals/modules/reverseproxy/service -run ^
  • Full multi-database test requires Docker, which was unavailable locally.

Summary by CodeRabbit

  • Bug Fixes

    • Reverse-proxy service targets now receive unique database identifiers automatically when saved.
    • Improved persistence reliability for reverse-proxy configurations, helping ensure saved targets can be referenced and managed consistently.
  • Tests

    • Added coverage to verify that saved targets receive valid identifiers.

🔄 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/6785 **Author:** [@CoderSufiyan](https://github.com/CoderSufiyan) **Created:** 7/15/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/issue-6007-target-id` --- ### 📝 Commits (1) - [`16be815`](https://github.com/netbirdio/netbird/commit/16be8159c731e2fff70aa2706c74bb4994c4b4ea) [management] Ensure reverse proxy target IDs auto-increment ### 📊 Changes **2 files changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `management/internals/modules/reverseproxy/service/service.go` (+1 -1) 📝 `management/server/store/sql_store_test.go` (+3 -0) </details> ### 📄 Description ## Describe your changes Explicitly mark reverse-proxy target IDs as auto-incrementing in the GORM model. Add a regression assertion that a saved reverse-proxy target receives a database-generated ID. ## Issue ticket number and link Fixes #6007 ## Stack - [x] This PR is independent ## Checklist - [x] I have performed a self-review of my own code - [x] I have tested the changes locally - [x] I have added or updated tests where applicable - [x] I have checked for breaking changes ## Documentation - [x] Documentation is **not needed** ## Validation - `go test ./management/server/store ./management/internals/modules/reverseproxy/service -run ^` - Full multi-database test requires Docker, which was unavailable locally. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Reverse-proxy service targets now receive unique database identifiers automatically when saved. - Improved persistence reliability for reverse-proxy configurations, helping ensure saved targets can be referenced and managed consistently. - **Tests** - Added coverage to verify that saved targets receive valid identifiers. <!-- 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 07:08:08 -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#27048