Closed utkuozdemir closed 1 week ago
Hmm, I think we can do better:
errgroup.Group
implementation which does what we want.errgroup
using https://golangci-lint.run/usage/linters/#depguardgo
statement using https://golangci-lint.run/usage/linters/#forbidigoHmm, I think we can do better:
- Create our own
errgroup.Group
implementation which does what we want.- Forbid the usage of
errgroup
using golangci-lint.run/usage/linters/#depguard- Forbid the usage of
go
statement using golangci-lint.run/usage/linters/#forbidigo
ah this makes perfect sense, thanks.
Hmm, I think we can do better:
- Create our own
errgroup.Group
implementation which does what we want.- Forbid the usage of
errgroup
using golangci-lint.run/usage/linters/#depguard- Forbid the usage of
go
statement using golangci-lint.run/usage/linters/#forbidigo
done something along the lines of your suggestion and our discussion.
Rekres the project to include the feature (also bump Go to 1.22.4), but revert PROTOBUF_GO_VERSION and GRPC_GATEWAY_VERSION manually to not break the frontend.
Does it still break the frontend, I thought it was fixed?
Rekres the project to include the feature (also bump Go to 1.22.4), but revert PROTOBUF_GO_VERSION and GRPC_GATEWAY_VERSION manually to not break the frontend.
Does it still break the frontend, I thought it was fixed?
Actually, everything seemed to be working when I ran locally with newer versions and generated sources, but I saw some 500s for the watch requests in the browser developer console, so to be on the safe side I reverted manually anyway. So, not 100% sure. @DmitriyMV?
I think we should proceed and look into those 500s if they become a problem.
Ok, but I'll still merge this PR as-is, and make rekres a separate PR to not block this with any potential issues.
/m
Convert goroutine panics to errors or error logs.
Disallow usage of
golang.org/x/sync/errgroup
package in the backend bydepguard
linter. This linter configuration depends on: https://github.com/siderolabs/kres/pull/417Rekres the project to include the feature (also bump Go to 1.22.4), but revert
PROTOBUF_GO_VERSION
andGRPC_GATEWAY_VERSION
manually to not break the frontend.Disallowing the named
go
statement was not possible at the moment using existing linters, raised an issue inforbidigo
for it: https://github.com/ashanbrown/forbidigo/issues/47Closes https://github.com/siderolabs/omni/issues/373.