Open jnummelin opened 11 months ago
The issue is marked as stale since no activity has been recorded in 30 days
The issue is marked as stale since no activity has been recorded in 30 days
The issue is marked as stale since no activity has been recorded in 30 days
The issue is marked as stale since no activity has been recorded in 30 days
The issue is marked as stale since no activity has been recorded in 30 days
The issue is marked as stale since no activity has been recorded in 30 days
The issue is marked as stale since no activity has been recorded in 30 days
The issue is marked as stale since no activity has been recorded in 30 days
The issue is marked as stale since no activity has been recorded in 30 days
There's also a linter for that:
diff --git a/.golangci.yml b/.golangci.yml
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -10,11 +10,12 @@ run:
linters:
enable:
- - depguard # Checks if package imports are in a list of acceptable packages
- - errorlint # Find code that will cause problems with Go's error wrapping scheme
- - gofmt # Checks whether code was gofmt-ed
- - goheader # Checks is file headers matche a given pattern
- - revive # Stricter drop-in replacement for golint
+ - containedctx # Detects structs containing context.Context fields
+ - depguard # Checks if package imports are in a list of acceptable packages
+ - errorlint # Find code that will cause problems with Go's error wrapping scheme
+ - gofmt # Checks whether code was gofmt-ed
+ - goheader # Checks is file headers matche a given pattern
+ - revive # Stricter drop-in replacement for golint
linters-settings:
depguard:
The contexts in the autopilot structs may be harder to kill, as they are using this external cron library, which has some interfaces to be satisfied that can't be modified with an additional context parameter.
The issue is marked as stale since no activity has been recorded in 30 days
Prompted by discussion in https://github.com/k0sproject/k0s/pull/3406#pullrequestreview-1617279953
We have few structs which uses
Context
in structs which is bit of a bad pattern.Essentially we have the root signal aware context which is the root context for everything which we need to convey to all the components. We need to figure out a way to do that without storing the context in structs.