Skip to content

Fix cluster alerts timeout#25261

Merged
zmb3 merged 1 commit intomasterfrom
zmb3/cli-cluster-alerts-timeout
Apr 27, 2023
Merged

Fix cluster alerts timeout#25261
zmb3 merged 1 commit intomasterfrom
zmb3/cli-cluster-alerts-timeout

Conversation

@zmb3
Copy link
Copy Markdown
Collaborator

@zmb3 zmb3 commented Apr 27, 2023

tsh shows clusters alerts for both tsh login and tsh status. We intentionally used a short (500ms) timeout to avoid slowing down tsh status which was previously an "offline" command.

As a side effect, cluster alerts would not always show on login if they took longer than 500ms to fetch.

This change ensures that we always wait for cluster alerts to come back for tsh login, but we still enforce a short timeout for the tsh status command. (The timeout was increased slightly since the context now wraps the entire command and not just the cluster alerts call)

Fixes #25239

@github-actions github-actions Bot requested review from ibeckermayer and r0mant April 27, 2023 13:45
@github-actions github-actions Bot added size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Apr 27, 2023
tsh shows clusters alerts for both `tsh login` and `tsh status`.
We intentionally used a short (500ms) timeout to avoid slowing down
`tsh status` which was previously an "offline" command.

As a side effect, cluster alerts would not always show on login if
they took longer than 500ms to fetch.

This change ensures that we always wait for cluster alerts to come
back for `tsh login`, but we still enforce a short timeout for the
`tsh status` command. (The timeout was increased slightly since the
context now wraps the entire command and not just the cluster alerts
call)

Fixes #25239
@zmb3 zmb3 force-pushed the zmb3/cli-cluster-alerts-timeout branch from 0e30094 to 2c02aff Compare April 27, 2023 13:50
@zmb3 zmb3 requested a review from rosstimothy April 27, 2023 16:16
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from r0mant April 27, 2023 22:10
@zmb3 zmb3 added this pull request to the merge queue Apr 27, 2023
Merged via the queue into master with commit 5fe9617 Apr 27, 2023
@zmb3 zmb3 deleted the zmb3/cli-cluster-alerts-timeout branch April 27, 2023 22:28
@public-teleport-github-review-bot
Copy link
Copy Markdown

@zmb3 See the table below for backport results.

Branch Result
branch/v11 Create PR
branch/v12 Create PR
branch/v13 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tsh login timeout for fetching login alerts is too aggressive

3 participants