Skip to content

Commit 7cf66cc

Browse files
authored
Merge pull request #34 from pluralsh/marcin/prod-3812-need-to-update-go-client-in-kas
chore: Update Console client
2 parents 1735ea2 + 50d3e8d commit 7cf66cc

File tree

22 files changed

+474
-442
lines changed

22 files changed

+474
-442
lines changed

.github/workflows/ci.yaml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,28 +57,28 @@ jobs:
5757
runs-on: ubuntu-latest
5858
steps:
5959
- uses: actions/checkout@v4
60-
- uses: actions/setup-go@v4
60+
- uses: actions/setup-go@v5
6161
with:
6262
go-version-file: go.mod
6363
check-latest: true
64-
- uses: golangci/golangci-lint-action@v6.1.1
64+
- uses: golangci/golangci-lint-action@v7.0.0
6565
with:
66-
version: v1.63.4
67-
publish-debug-docker:
68-
name: Build and push debug kas containers
69-
runs-on: ubuntu-20.04
70-
permissions:
71-
contents: 'read'
72-
id-token: 'write'
73-
packages: 'write'
74-
strategy:
75-
matrix:
76-
image: [kas-debug, agentk-debug]
77-
include:
78-
- image: kas-debug
79-
dockerfile: ./build/docker/kas.debug.Dockerfile
80-
- image: agentk-debug
81-
dockerfile: ./build/docker/agentk.debug.Dockerfile
66+
version: v2.1.2
67+
# publish-debug-docker:
68+
# name: Build and push debug kas containers
69+
# runs-on: ubuntu-20.04
70+
# permissions:
71+
# contents: 'read'
72+
# id-token: 'write'
73+
# packages: 'write'
74+
# strategy:
75+
# matrix:
76+
# image: [kas-debug, agentk-debug]
77+
# include:
78+
# - image: kas-debug
79+
# dockerfile: ./build/docker/kas.debug.Dockerfile
80+
# - image: agentk-debug
81+
# dockerfile: ./build/docker/agentk.debug.Dockerfile
8282
steps:
8383
- name: Checkout
8484
uses: actions/checkout@v4

.golangci.yml

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,45 @@
1+
version: "2"
12
run:
23
modules-download-mode: readonly
34
allow-parallel-runners: true
4-
timeout: 5m
5-
5+
tests: false
66
linters:
7-
disable-all: true
7+
default: none
88
enable:
9-
# default linters
9+
- copyloopvar
1010
- errcheck
11-
- gosimple
12-
- govet
13-
- ineffassign
14-
- staticcheck
15-
- typecheck
16-
- unused
17-
18-
# additional linters
19-
- errorlint
2011
- errname
21-
- gocyclo
22-
- goimports
23-
- misspell
24-
- gofmt
25-
- importas
12+
- errorlint
2613
- goconst
2714
- gocritic
15+
- gocyclo
16+
- govet
17+
- importas
18+
- ineffassign
2819
- misspell
29-
30-
issues:
31-
# Excluding configuration per-path, per-linter, per-text and per-source
32-
exclude-files:
33-
# Exclude some linters from running on tests files.
34-
- .*_test\.go
20+
- prealloc
21+
- staticcheck
22+
- usestdlibvars
23+
- wastedassign
24+
- whitespace
25+
exclusions:
26+
generated: lax
27+
presets:
28+
- comments
29+
- common-false-positives
30+
- legacy
31+
- std-error-handling
32+
paths:
33+
- third_party$
34+
- builtin$
35+
- examples$
36+
formatters:
37+
enable:
38+
- gofmt
39+
- goimports
40+
exclusions:
41+
generated: lax
42+
paths:
43+
- third_party$
44+
- builtin$
45+
- examples$

build/docker/agentk.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Dockerfile for agentk
22

3-
FROM docker.io/golang:1.23 as builder
3+
FROM docker.io/golang:1.24 as builder
44

55
WORKDIR /src
66
COPY . .

build/docker/agentk.debug.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Dockerfile for kas
22

33
FROM busybox:uclibc as busybox
4-
FROM docker.io/golang:1.23 as builder
4+
FROM docker.io/golang:1.24 as builder
55

66
# Build Delve
77
RUN go install github.com/go-delve/delve/cmd/dlv@latest

build/docker/kas.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Dockerfile for kas
22

3-
FROM docker.io/golang:1.23 as builder
3+
FROM docker.io/golang:1.24 as builder
44

55
WORKDIR /src
66
COPY . .

build/docker/kas.debug.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Dockerfile for kas
22

33
FROM busybox:uclibc as busybox
4-
FROM docker.io/golang:1.23 as builder
4+
FROM docker.io/golang:1.24 as builder
55

66
# Build Delve
77
RUN go install github.com/go-delve/delve/cmd/dlv@latest

cmd/kas/kasapp/app_internal_server.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ type internalServer struct {
2626
func newInternalServer(tp trace.TracerProvider, mp otelmetric.MeterProvider, p propagation.TextMapPropagator,
2727
factory modserver.RpcApiFactory, probeRegistry *observability.ProbeRegistry,
2828
grpcServerErrorReporter grpctool2.ServerErrorReporter) (*internalServer, error) {
29-
3029
// In-memory gRPC client->listener pipe
3130
listener := grpctool2.NewDialListener()
3231

cmd/kas/kasapp/app_private_api_server.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ func newKasPool(log *zap.Logger, errRep errz.ErrReporter, tp trace.TracerProvide
201201
p propagation.TextMapPropagator, csh stats.Handler, jwtSecret []byte, ownPrivateApiUrl, ownPrivateApiHost, caCertificateFile string,
202202
dialer func(context.Context, string) (net.Conn, error),
203203
streamClientProm grpc.StreamClientInterceptor, unaryClientProm grpc.UnaryClientInterceptor) (grpctool2.PoolInterface, error) {
204-
205204
sharedPoolOpts := []grpc.DialOption{
206205
grpc.WithSharedWriteBuffer(true),
207206
// Default gRPC parameters are good, no need to change them at the moment.
@@ -260,7 +259,6 @@ func newKasPool(log *zap.Logger, errRep errz.ErrReporter, tp trace.TracerProvide
260259

261260
func constructOwnUrl(interfaceAddrs func() ([]net.Addr, error),
262261
ownUrl, ownCidr, ownScheme, ownPort, listenNetwork, listenAddress string) (string, error) {
263-
264262
if ownUrl != "" {
265263
if ownCidr != "" {
266264
return "", fmt.Errorf("either %s or %s should be specified, not both", envVarOwnPrivateApiUrl, envVarOwnPrivateApiCidr)

cmd/kas/kasapp/configured_app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ func (a *ConfiguredApp) isTracingEnabled() bool {
560560

561561
func startModules(stage stager.Stage, modules []modserver2.Module) {
562562
for _, module := range modules {
563-
module := module // closure captures the right variable
563+
// closure captures the right variable
564564
stage.Go(func(ctx context.Context) error {
565565
err := module.Run(ctx)
566566
if err != nil {

cmd/kas/kasapp/router_kas_tunnel_finder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func (f *tunnelFinder) tryKasLocked(kasUrl string) {
195195
func (f *tunnelFinder) tryKasAsync(ctx context.Context, cancel context.CancelFunc, kasUrl string) {
196196
log := f.log.With(logz.KasUrl(kasUrl)) // nolint:govet
197197
noTunnelSent := false
198-
_ = retry.PollWithBackoff(ctx, f.pollConfig(), func(ctx context.Context) (error, retry.AttemptResult) {
198+
_ = retry.PollWithBackoff(ctx, f.pollConfig(), func(ctx context.Context) (error, retry.AttemptResult) { // nolint:staticcheck
199199
success := false
200200

201201
// 1. Dial another kas

0 commit comments

Comments
 (0)