Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: implement retry mechanism for log processing#136

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kacpersaw merged 6 commits intomainfromkacpersaw/feat-log-queue
Sep 30, 2025

Conversation

kacpersaw
Copy link
Contributor

Closes#119

This PR adds error handling and retry functionality to the log streaming by adding exponential backoff retry logic for failed log operations.

Changes

  • Added retry mechanism with exponential backoff - automatically retries failed log operations, starting at 1 second delay and doubling up to 30 seconds max
  • Retry logic for failed API operations - triggers retries forPostLogSource andAgent dRPC client failures to handle connection issues
  • Per-agent retry state tracking - built retry state struct for each agent with individual timer and delay management
  • Automatic retry cleanup - clears retry state on successful operations and proper cleanup on agent deletion
  • Tests

With this PR, users will see more reliable logs from pod startup in their Coder workspace, including pod events before container startup that were previously not visible.

image

@kacpersawkacpersaw marked this pull request as ready for reviewSeptember 22, 2025 10:02
Copy link
Member

@deansheatherdeansheather left a comment

Choose a reason for hiding this comment

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

What happens when the log never succeeds? Maybe because an agent token is no longer valid. Judging by the code, logstream will attempt to send it to coder Forever

l.logger.Error(ctx,"max retries exceeded",
slog.F("retryCount",rs.retryCount),
slog.F("maxRetries",l.maxRetries))
rs.exhausted=true
Copy link
Member

Choose a reason for hiding this comment

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

This will be kept in memory forever now right?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@kacpersawkacpersaw merged commita5bd376 intomainSep 30, 2025
1 check passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@deansheatherdeansheatherdeansheather approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Pod events before container startup are not visible in Coder UI
2 participants
@kacpersaw@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp