-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Change list -> ConcurrentBag in BuildCheckContext #11461
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
Change list -> ConcurrentBag in BuildCheckContext #11461
Conversation
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.
Overall looks good
src/Build/BuildCheck/Infrastructure/BuildCheckManagerProvider.cs
Outdated
Show resolved
Hide resolved
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.
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/Build/BuildCheck/Infrastructure/BuildCheckManagerProvider.cs:373
- Ensure that the new behavior of using FirstOrDefault and Where with ConcurrentBag is covered by tests.
var checkFactory = _checkRegistry.FirstOrDefault(c => c.MaterializedCheck == check);
src/Build/BuildCheck/Infrastructure/BuildCheckManagerProvider.cs
Outdated
Show resolved
Hide resolved
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.
Looks good to me!
Fixes #11439 and #11319
Context
_checkRegistry
and_ruleTelemetryData
can be accessed in multithreaded environment (from logger and nodes).Changes Made
List -> ConcurrentBag
Testing
Since it fails on CI, we need to merge the change and check it on preview.