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

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

Original Pull Request: https://github.com/netbirdio/netbird/pull/6785

State: open
Merged: No


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.
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/6785 **State:** open **Merged:** No --- ## 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 -->
saavagebueno added the pull-request label 2026-08-05 08:07:15 -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#28982