[PR #2946] [MERGED] golangci-lint: use forbidigo to block time.Sleep #2954

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2946
Author: @kradalby
Created: 12/7/2025
Status: Merged
Merged: 12/10/2025
Merged by: @kradalby

Base: mainHead: kradalby/no-sleep


📝 Commits (8)

  • 6c308fc golangci-lint: use forbidigo to block time.Sleep
  • 1b39ddf derp: use context-aware wait for STUN error rate limiting
  • 1a9ffba cmd/hi: use exponential backoff for container removal retry
  • ed577b6 auth_test: remove unnecessary sleeps in goroutine tests
  • adeb705 db: use proper synchronization in garbage collector tests
  • 4689567 integration: remove flaky sleeps and add nolint for intentional delays
  • 437a032 state: use EventuallyWithT for goroutine leak detection
  • 9ac3013 mapper: replace time.Sleep with proper synchronization in batcher tests

📊 Changes

10 files changed (+313 additions, -181 deletions)

View changed files

📝 cmd/hi/cleanup.go (+14 -15)
📝 hscontrol/auth_test.go (+8 -15)
📝 hscontrol/db/ephemeral_garbage_collector_test.go (+66 -62)
📝 hscontrol/db/node_test.go (+47 -10)
📝 hscontrol/derp/server/derp_server.go (+7 -1)
📝 hscontrol/mapper/batcher_test.go (+145 -68)
📝 hscontrol/state/node_store_test.go (+14 -7)
📝 integration/auth_key_test.go (+8 -1)
📝 integration/auth_oidc_test.go (+2 -1)
📝 integration/embedded_derp_test.go (+2 -1)

📄 Description

claude was used in this cleanup.


🔄 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/2946 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 12/7/2025 **Status:** ✅ Merged **Merged:** 12/10/2025 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/no-sleep` --- ### 📝 Commits (8) - [`6c308fc`](https://github.com/juanfont/headscale/commit/6c308fcfd4f06ad9265e7496d6de62a8788ab710) golangci-lint: use forbidigo to block time.Sleep - [`1b39ddf`](https://github.com/juanfont/headscale/commit/1b39ddf149971497d73df137eda93d7e0dbb2f0c) derp: use context-aware wait for STUN error rate limiting - [`1a9ffba`](https://github.com/juanfont/headscale/commit/1a9ffba5b51a4f8adbeacfcc9c5c513102d97f1e) cmd/hi: use exponential backoff for container removal retry - [`ed577b6`](https://github.com/juanfont/headscale/commit/ed577b644e23b6c7a6e538feb2bab1c819d2dd6a) auth_test: remove unnecessary sleeps in goroutine tests - [`adeb705`](https://github.com/juanfont/headscale/commit/adeb705298ee7ec18012cdec7ab817e73de21544) db: use proper synchronization in garbage collector tests - [`4689567`](https://github.com/juanfont/headscale/commit/46895677f470a3346fd798916901a3847f2a2468) integration: remove flaky sleeps and add nolint for intentional delays - [`437a032`](https://github.com/juanfont/headscale/commit/437a0328c77df9a8b83ad58c08f370e7fb9cc157) state: use EventuallyWithT for goroutine leak detection - [`9ac3013`](https://github.com/juanfont/headscale/commit/9ac301317f31474ff75f93705ae50fc0cbd5bf3a) mapper: replace time.Sleep with proper synchronization in batcher tests ### 📊 Changes **10 files changed** (+313 additions, -181 deletions) <details> <summary>View changed files</summary> 📝 `cmd/hi/cleanup.go` (+14 -15) 📝 `hscontrol/auth_test.go` (+8 -15) 📝 `hscontrol/db/ephemeral_garbage_collector_test.go` (+66 -62) 📝 `hscontrol/db/node_test.go` (+47 -10) 📝 `hscontrol/derp/server/derp_server.go` (+7 -1) 📝 `hscontrol/mapper/batcher_test.go` (+145 -68) 📝 `hscontrol/state/node_store_test.go` (+14 -7) 📝 `integration/auth_key_test.go` (+8 -1) 📝 `integration/auth_oidc_test.go` (+2 -1) 📝 `integration/embedded_derp_test.go` (+2 -1) </details> ### 📄 Description claude was used in this cleanup. --- <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:19:48 +01:00
adam closed this issue 2025-12-29 04:19:48 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2954