diff --git a/.nextchanges/air/watch-retry-notice.md b/.nextchanges/air/watch-retry-notice.md new file mode 100644 index 00000000000..11df8c30fb1 --- /dev/null +++ b/.nextchanges/air/watch-retry-notice.md @@ -0,0 +1 @@ +* Stop printing a retry notice on every `air run --watch`; retries are still reported when they happen. ([#7270](https://github.com/databricks/cli/pull/7270)) diff --git a/cmd/air/run.go b/cmd/air/run.go index db65967a32a..d63193e5888 100644 --- a/cmd/air/run.go +++ b/cmd/air/run.go @@ -243,13 +243,6 @@ The path must be a separate argument: cobra reserves -h as a boolean, so // Separate the submit summary from the streamed logs. fmt.Fprintln(out) fmt.Fprintln(out, monitoringMessage) - if maxRetries > 0 { - unit := "times" - if maxRetries == 1 { - unit = "time" - } - fmt.Fprintf(out, "Failed attempts will be retried up to %d %s.\n", maxRetries, unit) - } printLogsDivider(ctx, out) return handleWatchResult(out, w.Config.Profile, runIDStr, runLogs(watchCtx, cmd, req)) } diff --git a/cmd/air/run_watch_test.go b/cmd/air/run_watch_test.go index e1843e78ed1..52a859de21b 100644 --- a/cmd/air/run_watch_test.go +++ b/cmd/air/run_watch_test.go @@ -129,7 +129,8 @@ func TestRunWatchStreamsLogs(t *testing.T) { assert.Contains(t, out, "Submitted workload with Job Run ID: 777") assert.Contains(t, out, "View job run at: ") assert.Contains(t, out, "Monitoring run and streaming logs...") - assert.Contains(t, out, "Failed attempts will be retried up to 3 times.") + // Retries are announced only when one happens, so a healthy run doesn't look like it failed. + assert.NotContains(t, out, "retried") assert.NotContains(t, out, "from node 0") // A "Logs" divider separates the submit summary from the streamed logs. assert.Contains(t, out, "Logs")