[PR #2600] [MERGED] policy: remove v1 code #2757

Closed
opened 2025-12-29 04:18:47 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2600
Author: @kradalby
Created: 5/15/2025
Status: Merged
Merged: 5/20/2025
Merged by: @kradalby

Base: mainHead: kradalby/remove-policy-v1


📝 Commits (10+)

  • 10e79d3 policy: remove v1 code
  • d2fc059 db: update test with v1 removal
  • 065c41d integration: start moving to v2 policy
  • 122308b policy: add ssh unmarshal tests
  • cd3c03a merge autogroups
  • f13cec6 changelog: add entry
  • 0ddbacf policy: remove v1 comment
  • 05b7dbe integration: remove comment out case
  • e385bad cleanup skipv1
  • 4ba516c policy: remove v1 prefix workaround

📊 Changes

21 files changed (+1251 additions, -4830 deletions)

View changed files

📝 CHANGELOG.md (+5 -0)
📝 hscontrol/db/node_test.go (+1 -2)
📝 hscontrol/mapper/mapper_test.go (+1 -1)
📝 hscontrol/policy/pm.go (+4 -21)
📝 hscontrol/policy/policy_test.go (+2 -39)
📝 hscontrol/policy/route_approval_test.go (+5 -12)
hscontrol/policy/v1/acls.go (+0 -996)
hscontrol/policy/v1/acls_test.go (+0 -2797)
hscontrol/policy/v1/acls_types.go (+0 -123)
hscontrol/policy/v1/policy.go (+0 -188)
hscontrol/policy/v1/policy_test.go (+0 -180)
📝 hscontrol/policy/v2/types.go (+365 -54)
📝 hscontrol/policy/v2/types_test.go (+251 -7)
📝 integration/acl_test.go (+271 -195)
📝 integration/cli_test.go (+58 -40)
📝 integration/control.go (+2 -2)
📝 integration/hsic/hsic.go (+5 -12)
📝 integration/route_test.go (+136 -97)
📝 integration/scenario.go (+0 -5)
📝 integration/ssh_test.go (+74 -58)

...and 1 more files

📄 Description

This PR removes the v1 policy code, a pretty nice cleanup.

It migrates integration tests to define their policy with v2, fixing any gaps in the marshaller of v2.


🔄 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/2600 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 5/15/2025 **Status:** ✅ Merged **Merged:** 5/20/2025 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/remove-policy-v1` --- ### 📝 Commits (10+) - [`10e79d3`](https://github.com/juanfont/headscale/commit/10e79d3cfa715cb2f419c5c7a90a5a98058284e3) policy: remove v1 code - [`d2fc059`](https://github.com/juanfont/headscale/commit/d2fc059357078906914b9ee50b1cfcd53db4cbb2) db: update test with v1 removal - [`065c41d`](https://github.com/juanfont/headscale/commit/065c41d1d8306d050ae47937207fca5eb010d50b) integration: start moving to v2 policy - [`122308b`](https://github.com/juanfont/headscale/commit/122308ba36499a59f15c064ef5be07187b607d24) policy: add ssh unmarshal tests - [`cd3c03a`](https://github.com/juanfont/headscale/commit/cd3c03a0d3c90d63882dd1c8e980044a57249f1d) merge autogroups - [`f13cec6`](https://github.com/juanfont/headscale/commit/f13cec6bc3bc96562aca4839b62a691139e468f2) changelog: add entry - [`0ddbacf`](https://github.com/juanfont/headscale/commit/0ddbacf81fd7dee6fa0f78e65ca308a9341f77a5) policy: remove v1 comment - [`05b7dbe`](https://github.com/juanfont/headscale/commit/05b7dbe5e96c261f0576d1cd60b5a03680b3bc16) integration: remove comment out case - [`e385bad`](https://github.com/juanfont/headscale/commit/e385bad55449c9e221e36c3a9c06fbdea4ddba73) cleanup skipv1 - [`4ba516c`](https://github.com/juanfont/headscale/commit/4ba516cfa1e4a451ee9c382c1711b3208b6fbfac) policy: remove v1 prefix workaround ### 📊 Changes **21 files changed** (+1251 additions, -4830 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+5 -0) 📝 `hscontrol/db/node_test.go` (+1 -2) 📝 `hscontrol/mapper/mapper_test.go` (+1 -1) 📝 `hscontrol/policy/pm.go` (+4 -21) 📝 `hscontrol/policy/policy_test.go` (+2 -39) 📝 `hscontrol/policy/route_approval_test.go` (+5 -12) ➖ `hscontrol/policy/v1/acls.go` (+0 -996) ➖ `hscontrol/policy/v1/acls_test.go` (+0 -2797) ➖ `hscontrol/policy/v1/acls_types.go` (+0 -123) ➖ `hscontrol/policy/v1/policy.go` (+0 -188) ➖ `hscontrol/policy/v1/policy_test.go` (+0 -180) 📝 `hscontrol/policy/v2/types.go` (+365 -54) 📝 `hscontrol/policy/v2/types_test.go` (+251 -7) 📝 `integration/acl_test.go` (+271 -195) 📝 `integration/cli_test.go` (+58 -40) 📝 `integration/control.go` (+2 -2) 📝 `integration/hsic/hsic.go` (+5 -12) 📝 `integration/route_test.go` (+136 -97) 📝 `integration/scenario.go` (+0 -5) 📝 `integration/ssh_test.go` (+74 -58) _...and 1 more files_ </details> ### 📄 Description This PR removes the v1 policy code, a pretty nice cleanup. It migrates integration tests to define their policy with v2, fixing any gaps in the marshaller of v2. --- <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 04:18:47 +01:00
adam closed this issue 2025-12-29 04:18:47 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2757