Skip to content

Allow for PR queries across projects#91

Merged
supermem613 merged 11 commits intomainfrom
pr-cross-project
May 11, 2023
Merged

Allow for PR queries across projects#91
supermem613 merged 11 commits intomainfrom
pr-cross-project

Conversation

@supermem613
Copy link
Copy Markdown
Contributor

In a number of cases, PRs happen in a different project than Work Items. This makes it cumbersome to use TeamMate as you'd have to keep flipping the active project.

With this change, we will allow for setting PR queries against any of the connected projects.

We then extend the PR queries to allow for any CreatedBy or AssignedTo based on emails.

@supermem613 supermem613 added the enhancement New feature or request label May 10, 2023
@supermem613 supermem613 self-assigned this May 10, 2023
@ivanv-microsoft
Copy link
Copy Markdown
Member

ivanv-microsoft commented May 10, 2023 via email

@supermem613 supermem613 enabled auto-merge (squash) May 10, 2023 15:33
@supermem613
Copy link
Copy Markdown
Contributor Author

@ivanv-microsoft , please take a look and sign off when you have a min...

Copy link
Copy Markdown
Member

@ivanv-microsoft ivanv-microsoft left a comment

Choose a reason for hiding this comment

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

Great work!

Comment thread Source/TeamMate/ViewModels/PullRequestPageViewModel.cs
Comment thread Source/TeamMate/Services/ResolverService.cs
Comment thread Source/TeamMate/ViewModels/PullRequestPickerViewModel.cs
@supermem613 supermem613 merged commit 7f2e8f4 into main May 11, 2023
@supermem613 supermem613 deleted the pr-cross-project branch May 11, 2023 12:42
supermem613 added a commit that referenced this pull request Jan 12, 2024
This is a regression from the PR functionality (#91). We have a cache of graph objects (user and groups) to provide email resolution in query UX. For customers with very large graphs, lo and behold, we tie up a lot of memory.

We are going to mitigate the memory usage with two approaches:

(1) Instead of caching full graph objects (user and group), let's just cache the data we use. This brings down memory consumption by ~60% on a test machine where there are a lot of objects to cache.
(2) We will only load the resolver cache when it is used. If a customer doesn't use PR functionality at all, it would never light up, so we save the bandwidth, CPU, and memory. Compared to 0.1.8, this change yields ~80% memory savings on a machine with lots of graph objects.

Overall, this will make the PR feature fully pay-for-play as you won't pay any CPU, network, or memory costs unless you use it. And even when you use it, we will use a lot less memory (~60% less in my tests).

Also tested with PR queries and observed the on-demand querying happening. All async and not blocking any UI threads as it was previously.

Fixes #100.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants