-
Notifications
You must be signed in to change notification settings - Fork 31
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
Decouple wiql from class instance #1609
Conversation
{ | ||
_telemetryClient?.TrackTrace("Fetches a WorkItemQueryResult for fetching work item Ids and urls", | ||
SeverityLevel.Information, | ||
_knownIssuesTraceProperties); | ||
this.IssuesEnvironment = environment; |
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.
I suspect you may have issues with this being an instance variable. As the KnownIssuesService
is a singleton in the project.
services.AddSingleton<IKnownIssuesService, KnownIssuesService.Services.KnownIssuesService>(); |
When two simultaneous calls to the controller are made with different parameters, you may run into race condition as the same variable may be replaced with the second call before the first call completes.
I believe the parameter should pass down the call stack rather than setting a shared instance to be read later on by the GetQueryByWiqlAsync
function call.
Same for the WorkItemQuery
variable.
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
….com/microsoftgraph/microsoft-graph-devx-api into task/switch-knowissues-organisations
SonarCloud Quality Gate failed. 0 Bugs 69.2% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
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.
thanks for making the changes
Overview
Fixes #1608
Demo
Optional. Screenshots,
curl
examples, etc.Notes
Optional. Ancillary topics, caveats, alternative strategies that didn't work out, anything else.
Testing Instructions