Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: agentcontainers: fix flake when ctx cancelled while running docker inspect #18526

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 2 commits into from
Jun 24, 2025

Conversation

johnstcn
Copy link
Member

Should fix coder/internal#738

@johnstcn johnstcn requested review from mafredri and spikecurtis June 24, 2025 11:13
@johnstcn johnstcn self-assigned this Jun 24, 2025
Copy link
Member

@mafredri mafredri left a comment

Choose a reason for hiding this comment

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

Other than the simplification suggestion, LGTM 👍🏻

@@ -378,7 +378,11 @@ func (api *API) updaterLoop() {
// and anyone looking to interact with the API.
api.logger.Debug(api.ctx, "performing initial containers update")
if err := api.updateContainers(api.ctx); err != nil {
api.logger.Error(api.ctx, "initial containers update failed", slog.Error(err))
if errors.Is(err, context.Canceled) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Note that context.Canceled doesn't, by default, trigger test failure. Still, nice to not pollute the error stream.

@johnstcn johnstcn merged commit 4066785 into main Jun 24, 2025
34 checks passed
@johnstcn johnstcn deleted the cj/flake/agentcontainers-inspect-ctx-cancel branch June 24, 2025 12:30
@github-actions github-actions bot locked and limited conversation to collaborators Jun 24, 2025
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.

flake: TestSSH_Container/OK
3 participants