From aaaeb6bfb481774ec0ad5f5402361c52cff8ac82 Mon Sep 17 00:00:00 2001 From: "denis.bilenko" Date: Thu, 19 Nov 2026 09:52:48 +0000 Subject: [PATCH] Skip TestTelemetryEndpoint when /telemetry-ext stays rate limited The SDK retries 429 for its 5-minute retry timeout. When the shared test workspace keeps throttling /telemetry-ext for longer (traffic from other concurrent CI runs), the test fails with "Too Many Requests" after 300s. That says nothing about the endpoint accepting the logs, so skip instead. Co-authored-by: Isaac --- integration/libs/telemetry/telemetry_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/integration/libs/telemetry/telemetry_test.go b/integration/libs/telemetry/telemetry_test.go index 32a0fb8ea6a..186278dc993 100644 --- a/integration/libs/telemetry/telemetry_test.go +++ b/integration/libs/telemetry/telemetry_test.go @@ -2,6 +2,8 @@ package telemetry import ( "encoding/json" + "errors" + "net/http" "testing" "time" "uuid" @@ -9,6 +11,7 @@ import ( "github.com/databricks/cli/integration/internal/acc" "github.com/databricks/cli/libs/telemetry" "github.com/databricks/cli/libs/telemetry/protos" + "github.com/databricks/databricks-sdk-go/apierr" "github.com/databricks/databricks-sdk-go/client" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -56,6 +59,13 @@ func TestTelemetryEndpoint(t *testing.T) { respB := telemetry.ResponseBody{} err = apiClient.Do(ctx, "POST", "/telemetry-ext", nil, nil, reqB, &respB) + // The SDK retries 429 responses for its full retry timeout (5 minutes). + // A 429 that outlasts it means the shared test workspace is throttling + // /telemetry-ext because of traffic from other concurrent CI runs; it + // says nothing about whether the endpoint accepts these logs. + if aerr, ok := errors.AsType[*apierr.APIError](err); ok && aerr.StatusCode == http.StatusTooManyRequests { + t.Skipf("/telemetry-ext is rate limited on this workspace: %s", aerr.Message) + } require.NoError(t, err) assert.Equal(t, telemetry.ResponseBody{