-
Notifications
You must be signed in to change notification settings - Fork 17
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
Enable searching. #136
Enable searching. #136
Conversation
f595569
into
feature/dhoehna/SearchOptionsForGettingRepositories
} | ||
|
||
return _organizationsAndProjects[organization]; | ||
} |
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 don't understand this locking code - is it right?
I see only one lock on '_getProjectsLock' but many users of '_organizationsAndProjects'.
And there's a double-checked lock - which is always super fishy (at least if the caller requires the returned information to be correct.)
} | ||
if (developerId is not DeveloperId.DeveloperId azureDeveloperId) | ||
{ | ||
var exception = new NotSupportedException("Authenticated user is not the an azure developer id."); |
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.
} | ||
if (defaultOrg != null) | ||
{ | ||
server = _defaultSearchServerName; |
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.
|
||
_azureHierarchy ??= new AzureRepositoryHierarchy(azureDeveloperId); | ||
_azureHierarchy ??= new AzureRepositoryHierarchy(azureDeveloperId); |
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.
_azureHierarchy ??= new AzureRepositoryHierarchy(azureDeveloperId);
(i'm new to c# and ??= and Task.Run - so forgive my questions)
How does _azureHierarchy stay correct.
Say someone calls GetRepos with azureDeveloperId X, and that sets _azureHierarchy. Then someone calls GetRepositoriesAsync with azureDeveloperId Y.
Who is GetOrganizations [on line 171] being called for - user X or user Y?
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.
Hrm - I think i just don't understand line 162
developerId is not DeveloperId.DeveloperId azureDeveloperId
* Adding search functionality to repos (#117) * Building with new SDK. Have not tested * WIP * Handling the new SDK + .NET 8.0 * Adding comments * Fixing some errors * Using updated SDK * Update src/AzureExtension/Providers/RepositoryProvider.cs Co-authored-by: Branden Bonaby <[email protected]> * Update src/AzureExtension/Providers/RepositoryProvider.cs Co-authored-by: Branden Bonaby <[email protected]> * Reverting .NET 8 changes * Slipped through * Removing IRepositoryProvider since IRepositoryProvider2 requires it. * Using lock * USing locks instead of tasks * Moving return to inside the lock. * typo --------- Co-authored-by: Darren Hoehna <[email protected]> Co-authored-by: Branden Bonaby <[email protected]> * Enable searching. (#136) * Eeeyyy, it works. :) * Removing local source * Adding comments to explain the server search code. * Addressing comments. * Update src/AzureExtension/Strings/en-US/Resources.resw Co-authored-by: Branden Bonaby <[email protected]> * Moving reading code outside of the lock. * Adding some race-condition checking --------- Co-authored-by: Darren Hoehna <[email protected]> Co-authored-by: Branden Bonaby <[email protected]> * Change * Updating to new SDK * Removing local package source --------- Co-authored-by: Darren Hoehna <[email protected]> Co-authored-by: Branden Bonaby <[email protected]>
* Adding search functionality to repos (#117) * Building with new SDK. Have not tested * WIP * Handling the new SDK + .NET 8.0 * Adding comments * Fixing some errors * Using updated SDK * Update src/AzureExtension/Providers/RepositoryProvider.cs Co-authored-by: Branden Bonaby <[email protected]> * Update src/AzureExtension/Providers/RepositoryProvider.cs Co-authored-by: Branden Bonaby <[email protected]> * Reverting .NET 8 changes * Slipped through * Removing IRepositoryProvider since IRepositoryProvider2 requires it. * Using lock * USing locks instead of tasks * Moving return to inside the lock. * typo --------- Co-authored-by: Darren Hoehna <[email protected]> Co-authored-by: Branden Bonaby <[email protected]> * Enable searching. (#136) * Eeeyyy, it works. :) * Removing local source * Adding comments to explain the server search code. * Addressing comments. * Update src/AzureExtension/Strings/en-US/Resources.resw Co-authored-by: Branden Bonaby <[email protected]> * Moving reading code outside of the lock. * Adding some race-condition checking --------- Co-authored-by: Darren Hoehna <[email protected]> Co-authored-by: Branden Bonaby <[email protected]> * Change * Updating to new SDK * Removing local package source --------- Co-authored-by: Darren Hoehna <[email protected]> Co-authored-by: Branden Bonaby <[email protected]>
Summary of the pull request
Enables searching for repos.
References and relevant issues
Detailed description of the pull request / Additional comments
Validation steps performed
Manually ran and validated I could clone repos.
PR checklist