[PR #2155] [MERGED] denormalise PreAuthKey tags #2528

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

📋 Pull Request Information

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

Base: mainHead: kradalby/denorm-acl-tags


📝 Commits (1)

  • 27616b9 denormalise PreAuthKey tags

📊 Changes

5 files changed (+133 additions, -38 deletions)

View changed files

📝 hscontrol/db/db.go (+56 -1)
📝 hscontrol/db/db_test.go (+64 -0)
📝 hscontrol/db/preauth_keys.go (+9 -22)
hscontrol/db/testdata/0-23-0-to-0-24-0-preauthkey-tags-table.sqlite (+0 -0)
📝 hscontrol/types/preauth_key.go (+4 -15)

📄 Description

this commit denormalises the Tags related to a Pre auth key back onto the preauthkey table and struct as a string list.

There was not really any real normalisation here as we just added a bunch of duplicate tags with new IDs and preauthkeyIDs, lots of GORM cermony but no actual advantage.

This work is the start to fixup tags which currently are not working as they should.

Updates #1369


🔄 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/2155 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 9/27/2024 **Status:** ✅ Merged **Merged:** 9/29/2024 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/denorm-acl-tags` --- ### 📝 Commits (1) - [`27616b9`](https://github.com/juanfont/headscale/commit/27616b9f98051eaae332e2e95fe98a24cc960627) denormalise PreAuthKey tags ### 📊 Changes **5 files changed** (+133 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `hscontrol/db/db.go` (+56 -1) 📝 `hscontrol/db/db_test.go` (+64 -0) 📝 `hscontrol/db/preauth_keys.go` (+9 -22) ➕ `hscontrol/db/testdata/0-23-0-to-0-24-0-preauthkey-tags-table.sqlite` (+0 -0) 📝 `hscontrol/types/preauth_key.go` (+4 -15) </details> ### 📄 Description this commit denormalises the Tags related to a Pre auth key back onto the preauthkey table and struct as a string list. There was not really any real normalisation here as we just added a bunch of duplicate tags with new IDs and preauthkeyIDs, lots of GORM cermony but no actual advantage. This work is the start to fixup tags which currently are not working as they should. Updates #1369 --- <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:40 +01:00
adam closed this issue 2025-12-29 03:21:40 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2528