[PR #1756] [MERGED] new IP allocator and add postgres to integration tests. #2300

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/1756
Author: @kradalby
Created: 2/15/2024
Status: Merged
Merged: 2/18/2024
Merged by: @kradalby

Base: mainHead: postgres-tests


📝 Commits (10+)

  • b90c740 introduce dedicated ip allocator
  • 4758469 rename ip_prefixes to prefixes.v(4|6)
  • 9116cf2 require go 1.22
  • 4bfdd64 use new ip allocator
  • 801aeea lint --fix
  • e64c129 sort output of api lists by ID
  • 59db52c add env option to run integration test with postgres
  • 223d2cb add postgres to gh actions generator
  • f1ff353 generate postgres gh action jobsf
  • f59db05 log database being opened

📊 Changes

119 files changed (+3690 additions, -447 deletions)

View changed files

.github/workflows/test-integration-v2-TestACLAllowStarDst-postgres.yaml (+68 -0)
📝 .github/workflows/test-integration-v2-TestACLAllowStarDst.yaml (+1 -0)
.github/workflows/test-integration-v2-TestACLAllowUser80Dst-postgres.yaml (+68 -0)
📝 .github/workflows/test-integration-v2-TestACLAllowUser80Dst.yaml (+1 -0)
.github/workflows/test-integration-v2-TestACLAllowUserDst-postgres.yaml (+68 -0)
📝 .github/workflows/test-integration-v2-TestACLAllowUserDst.yaml (+1 -0)
.github/workflows/test-integration-v2-TestACLDenyAllPort80-postgres.yaml (+68 -0)
📝 .github/workflows/test-integration-v2-TestACLDenyAllPort80.yaml (+1 -0)
.github/workflows/test-integration-v2-TestACLDevice1CanAccessDevice2-postgres.yaml (+68 -0)
📝 .github/workflows/test-integration-v2-TestACLDevice1CanAccessDevice2.yaml (+1 -0)
.github/workflows/test-integration-v2-TestACLHostsInNetMapTable-postgres.yaml (+68 -0)
📝 .github/workflows/test-integration-v2-TestACLHostsInNetMapTable.yaml (+1 -0)
.github/workflows/test-integration-v2-TestACLNamedHostsCanReach-postgres.yaml (+68 -0)
📝 .github/workflows/test-integration-v2-TestACLNamedHostsCanReach.yaml (+1 -0)
.github/workflows/test-integration-v2-TestACLNamedHostsCanReachBySubnet-postgres.yaml (+68 -0)
📝 .github/workflows/test-integration-v2-TestACLNamedHostsCanReachBySubnet.yaml (+1 -0)
.github/workflows/test-integration-v2-TestApiKeyCommand-postgres.yaml (+68 -0)
📝 .github/workflows/test-integration-v2-TestApiKeyCommand.yaml (+1 -0)
.github/workflows/test-integration-v2-TestAuthKeyLogoutAndRelogin-postgres.yaml (+68 -0)
📝 .github/workflows/test-integration-v2-TestAuthKeyLogoutAndRelogin.yaml (+1 -0)

...and 80 more files

📄 Description

This PR adds a new IP allocator which should be more efficient, stable and less racy. This was necessary to deal with a discovered race condition in the allocation after adding postgresql integration tests.

I believe this is replacing the first "real" code I contributed to the project, and man, that was ver much needed 😆.

In addition it adds a new option to the integration tests to run them against postgresql instead of sqlite to ensure we do not have this regression again.

The last commit is the generation of new gh actions jobs and can be ignored as generated.

Fixes #1755

Signed-off-by: Kristoffer Dalby kristoffer@tailscale.com


🔄 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/1756 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 2/15/2024 **Status:** ✅ Merged **Merged:** 2/18/2024 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `postgres-tests` --- ### 📝 Commits (10+) - [`b90c740`](https://github.com/juanfont/headscale/commit/b90c740cb44abba96f1065f0f8f889585e358ce3) introduce dedicated ip allocator - [`4758469`](https://github.com/juanfont/headscale/commit/4758469dfef8b4fb535c034527a3999a464630bb) rename ip_prefixes to prefixes.v(4|6) - [`9116cf2`](https://github.com/juanfont/headscale/commit/9116cf23e0ffba2d139fbdbf46c89777edfbb762) require go 1.22 - [`4bfdd64`](https://github.com/juanfont/headscale/commit/4bfdd64701bd30080c01f093b2a8653806f385c4) use new ip allocator - [`801aeea`](https://github.com/juanfont/headscale/commit/801aeea294edae685bde64084ba6b2c4d70b1171) lint --fix - [`e64c129`](https://github.com/juanfont/headscale/commit/e64c129634d92d781ca30f9707d7e013c34390a0) sort output of api lists by ID - [`59db52c`](https://github.com/juanfont/headscale/commit/59db52cea061a9a439af0652b65fd2e70f5a7391) add env option to run integration test with postgres - [`223d2cb`](https://github.com/juanfont/headscale/commit/223d2cb119ff29b5f7f5f1dc033109f93a93618c) add postgres to gh actions generator - [`f1ff353`](https://github.com/juanfont/headscale/commit/f1ff353b7d5832ddae36b9880096777701b7dafd) generate postgres gh action jobsf - [`f59db05`](https://github.com/juanfont/headscale/commit/f59db056c0f8e0f3b47d9699f3514357dd5f6061) log database being opened ### 📊 Changes **119 files changed** (+3690 additions, -447 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/test-integration-v2-TestACLAllowStarDst-postgres.yaml` (+68 -0) 📝 `.github/workflows/test-integration-v2-TestACLAllowStarDst.yaml` (+1 -0) ➕ `.github/workflows/test-integration-v2-TestACLAllowUser80Dst-postgres.yaml` (+68 -0) 📝 `.github/workflows/test-integration-v2-TestACLAllowUser80Dst.yaml` (+1 -0) ➕ `.github/workflows/test-integration-v2-TestACLAllowUserDst-postgres.yaml` (+68 -0) 📝 `.github/workflows/test-integration-v2-TestACLAllowUserDst.yaml` (+1 -0) ➕ `.github/workflows/test-integration-v2-TestACLDenyAllPort80-postgres.yaml` (+68 -0) 📝 `.github/workflows/test-integration-v2-TestACLDenyAllPort80.yaml` (+1 -0) ➕ `.github/workflows/test-integration-v2-TestACLDevice1CanAccessDevice2-postgres.yaml` (+68 -0) 📝 `.github/workflows/test-integration-v2-TestACLDevice1CanAccessDevice2.yaml` (+1 -0) ➕ `.github/workflows/test-integration-v2-TestACLHostsInNetMapTable-postgres.yaml` (+68 -0) 📝 `.github/workflows/test-integration-v2-TestACLHostsInNetMapTable.yaml` (+1 -0) ➕ `.github/workflows/test-integration-v2-TestACLNamedHostsCanReach-postgres.yaml` (+68 -0) 📝 `.github/workflows/test-integration-v2-TestACLNamedHostsCanReach.yaml` (+1 -0) ➕ `.github/workflows/test-integration-v2-TestACLNamedHostsCanReachBySubnet-postgres.yaml` (+68 -0) 📝 `.github/workflows/test-integration-v2-TestACLNamedHostsCanReachBySubnet.yaml` (+1 -0) ➕ `.github/workflows/test-integration-v2-TestApiKeyCommand-postgres.yaml` (+68 -0) 📝 `.github/workflows/test-integration-v2-TestApiKeyCommand.yaml` (+1 -0) ➕ `.github/workflows/test-integration-v2-TestAuthKeyLogoutAndRelogin-postgres.yaml` (+68 -0) 📝 `.github/workflows/test-integration-v2-TestAuthKeyLogoutAndRelogin.yaml` (+1 -0) _...and 80 more files_ </details> ### 📄 Description This PR adds a new IP allocator which should be more efficient, stable and less racy. This was necessary to deal with a discovered race condition in the allocation after adding postgresql integration tests. I believe this is replacing the first "real" code I contributed to the project, and man, that was ver much needed 😆. In addition it adds a new option to the integration tests to run them against postgresql instead of sqlite to ensure we do not have this regression again. The last commit is the generation of new gh actions jobs and can be ignored as generated. Fixes #1755 Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com> --- <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:20:37 +01:00
adam closed this issue 2025-12-29 03:20: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#2300