Skip to content

fix(agent): keep track of lastReportIndex between invocations of reportLifecycle() #13075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Apr 25, 2024

Relates to #13062

When the connection to coderd is interrupted and agent.run() exits during "graceful shutdown" phase, reportLifecycle will forget where it last left off and proceed to report the entire history of agent states.

This PR moves the last state index to the agent so that it stays persistent across agent reconnects.

@johnstcn johnstcn marked this pull request as ready for review April 25, 2024 15:26
@johnstcn johnstcn merged commit 99dda4a into main Apr 25, 2024
32 checks passed
@johnstcn johnstcn deleted the cj/agent-resume-reportlifecycle branch April 25, 2024 15:54
@github-actions github-actions bot locked and limited conversation to collaborators Apr 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants