Skip to content
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

feat(syncer): add a syncer to reflect job status in local resources #360

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

Ladicle
Copy link
Contributor

@Ladicle Ladicle commented Jan 29, 2025

No description provided.

@github-actions github-actions bot added the enhancement New feature or request label Jan 29, 2025
@Ladicle Ladicle requested a review from kkaneda January 29, 2025 05:56
Copy link
Contributor

@kkaneda kkaneda left a comment

Choose a reason for hiding this comment

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

LG!

})
}

if err := eg.Wait(); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

eg.Wait() waits until all goroutines complete, but I think we want to return an error once one of them completes.

https://pkg.go.dev/golang.org/x/sync/errgroup#Group.Wait

If this makes sense, could you add a TODO comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This error group is created with a context in L44. The contexts are canceled when the group receives a first error, and the status syner uses that context.

@Ladicle Ladicle merged commit cb6aba3 into main Jan 29, 2025
3 checks passed
@Ladicle Ladicle deleted the sync branch January 29, 2025 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants