From 4e074f35137c6b450b19c93fa1b869e66d951181 Mon Sep 17 00:00:00 2001 From: Zhiwei Liang Date: Mon, 17 Aug 2026 23:04:48 -0400 Subject: [PATCH 1/2] TPT-4616: Honor cancelled retries and use go work for vet/build --- Makefile | 6 ++---- client.go | 7 +++++-- test/unit/vpc_subnets_test.go | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 419b18980..4cef18c39 100644 --- a/Makefile +++ b/Makefile @@ -44,12 +44,10 @@ test-smoke: cd test && make test-smoke TEST_TIMEOUT=$(TEST_TIMEOUT) build: vet lint - go build ./... - cd k8s && go build ./... + go build work vet: - go vet ./... - cd k8s && go vet ./... + go vet work lint: ifeq ($(SKIP_LINT), 1) diff --git a/client.go b/client.go index 6e96081d8..9cb2176e6 100644 --- a/client.go +++ b/client.go @@ -622,8 +622,11 @@ func (c *Client) doRequest(ctx context.Context, method, endpoint string, params waitTime = c.retryMaxWaitTime } - // Sleep for the calculated duration before retrying - time.Sleep(waitTime) + select { + case <-ctx.Done(): + return ctx.Err() + case <-time.After(waitTime): + } } return err diff --git a/test/unit/vpc_subnets_test.go b/test/unit/vpc_subnets_test.go index 8d7b9471c..88435b496 100644 --- a/test/unit/vpc_subnets_test.go +++ b/test/unit/vpc_subnets_test.go @@ -23,7 +23,7 @@ func TestVPCSubnet_Create(t *testing.T) { IPv4: "192.168.1.0/24", IPv6: []linodego.VPCSubnetCreateOptionsIPv6{ { - linodego.Pointer("auto"), + Range: linodego.Pointer("auto"), }, }, } From 219f1ad3b6f6405bc629b0875dfef3276914a29c Mon Sep 17 00:00:00 2001 From: Zhiwei Liang Date: Mon, 21 Sep 2026 12:50:48 -0400 Subject: [PATCH 2/2] fix AGENTS.md --- AGENTS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 569179c13..a28fd322b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,7 +14,8 @@ - Faster focused default: run `go test ./...` at the repo root for root-module unit coverage only, then run focused tests in `test/` or `k8s/` as needed. - Unit tests excluding integration playback: `make test-unit`; pass focused args as `make TEST_ARGS="-run TestName" test-unit`. - Integration fixture playback: `make test-int`; focused playback: `make TEST_ARGS="-run TestListVolumes" test-int`. -- K8s module verification: `cd k8s && go test ./...` or use root `make build`/`make vet`, which enter `k8s/` explicitly. +- Workspace-wide vet/build: root `make vet`/`make build` run `go vet work`/`go build work` (Go 1.25) so all workspace modules are checked in one command. `make tidy` stays per-module. +- K8s module tests: `cd k8s && go test ./...`. - Tidy all modules after dependency changes: `make tidy`. ## Lint And Formatting