[PR #2127] [MERGED] move logic for validating node names #2515

Closed
opened 2025-12-29 03:21:37 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2127
Author: @kradalby
Created: 9/11/2024
Status: Merged
Merged: 9/11/2024
Merged by: @kradalby

Base: mainHead: kradalby/2121-move-given-name-logic


📝 Commits (2)

📊 Changes

4 files changed (+134 additions, -115 deletions)

View changed files

📝 hscontrol/auth.go (+1 -25)
📝 hscontrol/db/node.go (+34 -38)
📝 hscontrol/db/node_test.go (+98 -45)
📝 hscontrol/grpcv1.go (+1 -7)

📄 Description

this commits moves the generation of "given names" of nodes into the registration function, and adds validation of renames to RenameNode using the same logic.

Fixes #2121

Summary by CodeRabbit

  • New Features

    • Enhanced node registration with checks for unique identifiers, improving data integrity.
    • Simplified node creation process by removing the GivenName field.
  • Bug Fixes

    • Ensured that node renaming adheres to uniqueness constraints, preventing conflicts.
  • Tests

    • Introduced new tests for renaming nodes to validate uniqueness and conflict resolution.
    • Removed outdated tests related to the generation of given names.

🔄 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/juanfont/headscale/pull/2127 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 9/11/2024 **Status:** ✅ Merged **Merged:** 9/11/2024 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/2121-move-given-name-logic` --- ### 📝 Commits (2) - [`225f8d4`](https://github.com/juanfont/headscale/commit/225f8d45b6492e2c670880bbda449fd9b276b95a) move logic for validating node names - [`d8c0432`](https://github.com/juanfont/headscale/commit/d8c043225593abe06bef22838092be37acfad589) fix double arg ### 📊 Changes **4 files changed** (+134 additions, -115 deletions) <details> <summary>View changed files</summary> 📝 `hscontrol/auth.go` (+1 -25) 📝 `hscontrol/db/node.go` (+34 -38) 📝 `hscontrol/db/node_test.go` (+98 -45) 📝 `hscontrol/grpcv1.go` (+1 -7) </details> ### 📄 Description this commits moves the generation of "given names" of nodes into the registration function, and adds validation of renames to RenameNode using the same logic. Fixes #2121 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced node registration with checks for unique identifiers, improving data integrity. - Simplified node creation process by removing the `GivenName` field. - **Bug Fixes** - Ensured that node renaming adheres to uniqueness constraints, preventing conflicts. - **Tests** - Introduced new tests for renaming nodes to validate uniqueness and conflict resolution. - Removed outdated tests related to the generation of given names. <!-- 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>
adam added the pull-request label 2025-12-29 03:21:37 +01:00
adam closed this issue 2025-12-29 03:21:37 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2515