- Notifications
You must be signed in to change notification settings - Fork905
test(agent/agentcontainers): fix test data race due to list manipulation#18250
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
test(agent/agentcontainers): fix test data race due to list manipulation#18250
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -378,6 +378,8 @@ func (api *API) updateContainers(ctx context.Context) error { | |||
return xerrors.Errorf("list containers failed: %w", err) | |||
} | |||
// Clone to avoid test flakes due to data manipulation. | |||
updated.Containers = slices.Clone(updated.Containers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Review: Perhaps not ideal, but I rather fix it here than in all the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
rust rewrite wen 🙃
Yes. But also no need, this can be refactored incoder/internal#666 where we no longer need to manipulate the data. |
2f8b056
intomainUh oh!
There was an error while loading.Please reload this page.
Fixescoder/internal#675