Skip to content

Fetch metadata in background for heartbeat#30528

Merged
atburke merged 1 commit intomasterfrom
atburke/heartbeat-test-flake
Aug 24, 2023
Merged

Fetch metadata in background for heartbeat#30528
atburke merged 1 commit intomasterfrom
atburke/heartbeat-test-flake

Conversation

@atburke
Copy link
Copy Markdown
Contributor

@atburke atburke commented Aug 16, 2023

This PR updates SSH server heartbeats to fetch metadata in the background so that the first heartbeat won't be delayed (this was causing flakiness in tests).

Comment thread lib/srv/heartbeatv2.go Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like we can simplify this. Did you consider using a sync.Once?

Comment thread lib/srv/heartbeatv2.go Outdated
Copy link
Copy Markdown
Contributor

@codingllama codingllama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion to have a bit less code.

Could we exercise this by calling NewSSHServerHeartbeat?

Comment thread lib/srv/heartbeatv2.go Outdated
Comment thread lib/srv/heartbeatv2.go Outdated
Comment thread lib/srv/heartbeatv2.go Outdated
Comment thread lib/srv/heartbeatv2.go Outdated
Comment thread lib/srv/heartbeatv2.go Outdated
@atburke
Copy link
Copy Markdown
Contributor Author

atburke commented Aug 23, 2023

Friendly ping @zmb3

Copy link
Copy Markdown
Contributor

@codingllama codingllama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, mostly testing comments.

Comment thread lib/srv/heartbeatv2.go Outdated
Comment thread lib/srv/heartbeatv2.go Outdated
Comment thread lib/srv/heartbeatv2_test.go Outdated
Comment thread lib/srv/heartbeatv2_test.go Outdated
Comment thread lib/srv/heartbeatv2_test.go Outdated
Comment thread lib/srv/heartbeatv2_test.go Outdated
Comment thread lib/srv/heartbeatv2_test.go Outdated
@atburke atburke enabled auto-merge August 24, 2023 17:35
@atburke atburke added this pull request to the merge queue Aug 24, 2023
@atburke atburke removed this pull request from the merge queue due to a manual request Aug 24, 2023
This change updates SSH server heartbeats to fetch metadata in the
background so that the first heartbeat won't be delayed (this was
causing flakiness in tests).
@atburke atburke force-pushed the atburke/heartbeat-test-flake branch from fd4f6a9 to d5d05f9 Compare August 24, 2023 17:37
@atburke atburke enabled auto-merge August 24, 2023 17:37
@atburke atburke added this pull request to the merge queue Aug 24, 2023
Merged via the queue into master with commit 92c8442 Aug 24, 2023
@atburke atburke deleted the atburke/heartbeat-test-flake branch August 24, 2023 18:26
@public-teleport-github-review-bot
Copy link
Copy Markdown

@atburke See the table below for backport results.

Branch Result
branch/v13 Create PR

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants