From 0ba395522fdf49dcacea8192e9cde6879f4e3799 Mon Sep 17 00:00:00 2001 From: Yaroslav Grebnov Date: Wed, 25 Nov 2026 18:25:24 +0100 Subject: [PATCH 1/4] Bump dependencies --- go.mod | 11 ++++++----- go.sum | 22 ++++++++++++---------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index 0700323..ba04539 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/e2engine/runner-local go 1.27 require ( - github.com/e2engine/core v0.3.2 - github.com/ygrebnov/errorc v0.6.1 + github.com/e2engine/core v0.3.3 + github.com/ygrebnov/errorc v0.7.0 github.com/ygrebnov/workers v0.7.1 ) @@ -13,15 +13,16 @@ require ( github.com/e2engine/instrumentation-go v0.2.3 // indirect github.com/e2engine/instrumentation-go/grpc v0.2.1 // indirect github.com/e2engine/instrumentation-go/http v0.2.2 // indirect + github.com/ygrebnov/fs v0.1.0 // indirect github.com/ygrebnov/keys v0.2.0 // indirect - github.com/ygrebnov/log v0.5.1 // indirect + github.com/ygrebnov/log v0.6.0 // indirect github.com/ygrebnov/metrics v0.1.1 // indirect - github.com/ygrebnov/model v0.8.1 // indirect + github.com/ygrebnov/model v0.9.0 // indirect golang.org/x/net v0.63.0 // indirect golang.org/x/sync v0.25.0 // indirect golang.org/x/sys v0.50.0 // indirect golang.org/x/text v0.44.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20261118221215-c8830f628b3f // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20261123191846-1e707ab9fbc2 // indirect google.golang.org/grpc v1.85.0 // indirect google.golang.org/protobuf v1.36.12 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 5a0597e..4905ec5 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/ github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/e2engine/core v0.3.2 h1:6CUOMzVfwLlSS+O1uzBYXjVyb45THfSXy8nqyO3edfY= -github.com/e2engine/core v0.3.2/go.mod h1:pQTg3FaajaO4OKt3exuEpSasr1BoS5JcBNgW+2FK+o8= +github.com/e2engine/core v0.3.3 h1:uoh7xn6786eurWwtJajq7meoClhOyV/49k/OEZy79do= +github.com/e2engine/core v0.3.3/go.mod h1:WzxdDsUl8qH/xk7WcPymatQqdZCwR6LaXgxIEIC6tV4= github.com/e2engine/instrumentation-go v0.2.3 h1:Al7SoAIiMHiJ4zxj71JYiFCE9MKgpXFGHxlZCHmbe+0= github.com/e2engine/instrumentation-go v0.2.3/go.mod h1:DyUxzrRZBCzOk+toAmxex+Xn09fYhutsCRUfNUgS8kQ= github.com/e2engine/instrumentation-go/grpc v0.2.1 h1:GB+ZDt/36/gtI1MjVD9agT/RdL9tDBVocAaZUD/rBGU= @@ -18,16 +18,18 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/ygrebnov/errorc v0.6.1 h1:ICww1JOesR0HyE3cVWMr0SBmB8RV1XSmGwB5yVP1SqE= -github.com/ygrebnov/errorc v0.6.1/go.mod h1:akitMzADmnm0i1X5fSJfBqiTqCzckka9sgukTRQN5ns= +github.com/ygrebnov/errorc v0.7.0 h1:UBk753h/SNWfX9W6Byp+zckIdybXJ/ixc+VWukpQfdQ= +github.com/ygrebnov/errorc v0.7.0/go.mod h1:akitMzADmnm0i1X5fSJfBqiTqCzckka9sgukTRQN5ns= +github.com/ygrebnov/fs v0.1.0 h1:cswbccHB+YuluFYwes02NigqSjP3ZgM5stOvW+MxjMo= +github.com/ygrebnov/fs v0.1.0/go.mod h1:c3BP57rdNpeWJBW9a45dvsfbV6Yydxer3cEbSzSW2I8= github.com/ygrebnov/keys v0.2.0 h1:KQSQG1la9WkTW59WbB3CK1yhxZ92el2ZJfV1XtlHTp0= github.com/ygrebnov/keys v0.2.0/go.mod h1:4IfRPgv7tFSlToKzHtA9MPMwXP0+HRJ0Kk8XSrvhDvQ= -github.com/ygrebnov/log v0.5.1 h1:+Kkr6sjOHcYRvzLEDvEsRdDcQPRy0YUtmgBCNdio7Fk= -github.com/ygrebnov/log v0.5.1/go.mod h1:Y21zKtQ3rEy1FDhSli2NvgaqVyig3hhUfxegjLPuknw= +github.com/ygrebnov/log v0.6.0 h1:BwIDPh3uE/kCTRV0rsSp7i8NDv0ayfYOJRrypXhLdOI= +github.com/ygrebnov/log v0.6.0/go.mod h1:ks5SJPRtemWcKFpXwi9pMxJ92cMWjqnmNQa2QXiXd+4= github.com/ygrebnov/metrics v0.1.1 h1:ErJQZiqvoJSx919m93WtgQk/6e6zD5YF88frqgf58nY= github.com/ygrebnov/metrics v0.1.1/go.mod h1:XWy8LtXx+Lx56KqTFG8lzSCrgLDfDrItCuGDztfHKE8= -github.com/ygrebnov/model v0.8.1 h1:KvnS97b/q3Z1GKSHSDYlfHoL3bNDR+ZT9Kf4yc1WnIE= -github.com/ygrebnov/model v0.8.1/go.mod h1:WEMMqdGYF45Kfce0pAe0poiF9hu+PONRSHd2L9li3tw= +github.com/ygrebnov/model v0.9.0 h1:G6QaYVcm9Nqyed/lPzkWfQ543ol9D0C8Yjz9gVUDy9Q= +github.com/ygrebnov/model v0.9.0/go.mod h1:KA8zospuMg3/LbNc+Lgh+8nEz1uR9nv8SN4Vxxt2ruM= github.com/ygrebnov/workers v0.7.1 h1:bin+tMCzb+eGhvGAoAcG5L6H4y3cf/GBrKAljLUqHFY= github.com/ygrebnov/workers v0.7.1/go.mod h1:auJWjK5mn8udS9VUL5wREviqsnXW1G+ndOXfpR+wopo= go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= @@ -42,8 +44,8 @@ golang.org/x/text v0.44.0 h1:YItdp/mQNGnsmrgpcdA5yQ3bnRxCfo/Tj/iByGW9GGo= golang.org/x/text v0.44.0/go.mod h1:S4FR1waQ9LbjQTls97SyRjDaUUVkaM+cXwwuG/G+MwY= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= -google.golang.org/genproto/googleapis/rpc v0.0.0-20261118221215-c8830f628b3f h1:aDW6Vb2T1K0xbAgW+ED8iz39WlgjjX/OKiNh6tXv/+g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20261118221215-c8830f628b3f/go.mod h1:OaIUM3+LpYcK2GXM4FTmhWoIq371Owdr+Cc7/BsYHHc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20261123191846-1e707ab9fbc2 h1:FCWn4wv5of/ooWpbWDIeOXqI3+h2MGnV7SvvcJ8f+bQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20261123191846-1e707ab9fbc2/go.mod h1:OaIUM3+LpYcK2GXM4FTmhWoIq371Owdr+Cc7/BsYHHc= google.golang.org/grpc v1.85.0 h1:BPBCfuVRQ1qvBhKDOq9uvQllMvO59rKsYhXpp7Dd8vw= google.golang.org/grpc v1.85.0/go.mod h1:0rQrOD58yjal/0EaVbGBANindixsCZNQPDV3VKtaKuQ= google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= From 76374d1016b6c6051cd0b939bcd30fe29317a002 Mon Sep 17 00:00:00 2001 From: Yaroslav Grebnov Date: Wed, 25 Nov 2026 18:27:07 +0100 Subject: [PATCH 2/4] Update tools --- tools/go.mod | 8 +++++--- tools/tools.go | 11 ----------- 2 files changed, 5 insertions(+), 14 deletions(-) delete mode 100644 tools/tools.go diff --git a/tools/go.mod b/tools/go.mod index 9c06724..43ad831 100644 --- a/tools/go.mod +++ b/tools/go.mod @@ -2,9 +2,9 @@ module tools go 1.27 -require ( - github.com/golangci/golangci-lint/v2 v2.15.0 - golang.org/x/vuln v1.10.0 +tool ( + github.com/golangci/golangci-lint/v2/cmd/golangci-lint + golang.org/x/vuln/cmd/govulncheck ) require ( @@ -91,6 +91,7 @@ require ( github.com/golangci/dupl v0.0.0-20260401084720-c99c5cf5c202 // indirect github.com/golangci/go-printf-func-name v0.1.1 // indirect github.com/golangci/gofmt v0.0.0-20260820135601-e84e05053792 // indirect + github.com/golangci/golangci-lint/v2 v2.15.0 // indirect github.com/golangci/golines v0.16.0 // indirect github.com/golangci/misspell v0.8.0 // indirect github.com/golangci/plugin-module-register v0.1.2 // indirect @@ -212,6 +213,7 @@ require ( golang.org/x/telemetry v0.0.0-20261116191925-e77a43154acb // indirect golang.org/x/text v0.41.0 // indirect golang.org/x/tools v0.53.0 // indirect + golang.org/x/vuln v1.10.0 // indirect google.golang.org/protobuf v1.36.12 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/tools/tools.go b/tools/tools.go deleted file mode 100644 index 3d46b73..0000000 --- a/tools/tools.go +++ /dev/null @@ -1,11 +0,0 @@ -//go:build tools - -// This file is for managing Go programs version with `go.mod`, which allows -// them to be kept up-to-date through tools like Dependabot. - -package tools - -import ( - _ "github.com/golangci/golangci-lint/v2/cmd/golangci-lint" - _ "golang.org/x/vuln/cmd/govulncheck" -) From 160008b1f885cece20eccbe098f79f3335d3b0d5 Mon Sep 17 00:00:00 2001 From: Yaroslav Grebnov Date: Wed, 25 Nov 2026 18:30:03 +0100 Subject: [PATCH 3/4] Update errors --- api/service.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/api/service.go b/api/service.go index 4782c07..7e08b48 100644 --- a/api/service.go +++ b/api/service.go @@ -127,9 +127,7 @@ func getSettings(opts ...Option) (*settings, error) { if s.logger == nil { s.logger, err = log.NewSilentLogger() if err != nil { - return nil, errorc.With( - coreerrors.ErrCannotInitializeLogger, errorc.Error(keys.Cause, err), - ) + return nil, errorc.WithCause(coreerrors.ErrCannotInitializeLogger, err) } } @@ -285,11 +283,11 @@ func (s *Service) Run(ctx context.Context) (runErr error) { } if completed { - if err := s.environment.Release( + if errRelease := s.environment.Release( ctx, result.GetEnvironmentInstanceID(), - ); err != nil { - return err + ); errRelease != nil { + return errRelease } } } From 20b55c892c2d8f62836b7c43a3627fc355088344 Mon Sep 17 00:00:00 2001 From: Yaroslav Grebnov Date: Wed, 25 Nov 2026 18:36:43 +0100 Subject: [PATCH 4/4] Update CI --- .github/workflows/build.yml | 101 +++++++++++++++++++++++++++++++++--- 1 file changed, 95 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53bb644..9bdc35e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,8 @@ permissions: contents: read jobs: - build: + dependencies: + name: Verify dependencies runs-on: ubuntu-latest steps: @@ -20,14 +21,102 @@ jobs: - name: Setup Go uses: actions/setup-go@v7 with: - go-version: "1.27.x" + go-version: '1.27.x' check-latest: true cache-dependency-path: | go.sum tools/go.sum - - name: Go version - run: go version + - name: Download modules + run: go mod download - - name: Verify - run: make verify + - name: Verify modules + run: go mod verify + + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Setup Go + uses: actions/setup-go@v7 + with: + go-version: '1.27.x' + check-latest: true + cache-dependency-path: | + go.sum + tools/go.sum + + - name: Lint + uses: golangci/golangci-lint-action@v9 + with: + version: v2.15.0 + args: --timeout=10m + + vulncheck: + name: Check vulnerabilities + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Setup Go + uses: actions/setup-go@v7 + with: + go-version: '1.27.x' + check-latest: true + cache-dependency-path: | + go.sum + tools/go.sum + + - name: Check vulnerabilities + run: make vulncheck + + test: + name: Test (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Setup Go + uses: actions/setup-go@v7 + with: + go-version: '1.27.x' + check-latest: true + cache-dependency-path: | + go.sum + tools/go.sum + + - name: Test + run: go test ./... -count=1 -timeout=600s + + race: + name: Race detector + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Setup Go + uses: actions/setup-go@v7 + with: + go-version: '1.27.x' + check-latest: true + cache-dependency-path: | + go.sum + tools/go.sum + + - name: Race tests + run: go test -race ./... -count=1 -timeout=600s