Skip to content

Conversation

niik
Copy link
Member

@niik niik commented Dec 17, 2024

Closes #19710

Description

So in #19626 I added a caching layer to make it really quick to scroll through the list of branches using a keyboard. Unfortunately it took me until debugging #19710 to realise that the cache key I use to cache the results from getAheadBehind was ...[branchname]. So for example ...main which is the worst case scenario. Once we had calculated the number of commits from the current branch to main that would get cached (essentially) in perpetuity regardless of what branch you were on and regardless of whether the tip of main had changed or not.

The first approach to solving this was to use the tip sha's as the cache key as we do for determineMergeability. Unfortunately it turns out the list of branches and the current branch tip is snapshotted into the ChooseBranchStep so it doesn't change until the dialog is closed and reopened.

Given that we want this to go out in a hotfix the simplest and safest solution is to just remove the caching for now and look for ways to add it back in later properly.

Screenshots

Release notes

Notes:

@niik niik requested a review from tidy-dev December 17, 2024 12:09
Copy link
Contributor

@tidy-dev tidy-dev left a comment

Choose a reason for hiding this comment

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

Makes sense!

@niik niik merged commit 0c9aa8c into development Dec 17, 2024
8 checks passed
@niik niik deleted the cache-less branch December 17, 2024 12:27
@willetta22
Copy link

Closes #19710

Description

So in #19626 I added a caching layer to make it really quick to scroll through the list of branches using a keyboard. Unfortunately it took me until debugging #19710 to realise that the cache key I use to cache the results from getAheadBehind was ...[branchname]. So for example ...main which is the worst case scenario. Once we had calculated the number of commits from the current branch to main that would get cached (essentially) in perpetuity regardless of what branch you were on and regardless of whether the tip of main had changed or not.

The first approach to solving this was to use the tip sha's as the cache key as we do for determineMergeability. Unfortunately it turns out the list of branches and the current branch tip is snapshotted into the ChooseBranchStep so it doesn't change until the dialog is closed and reopened.

Given that we want this to go out in a hotfix the simplest and safest solution is to just remove the caching for now and look for ways to add it back in later properly.

Screenshots

Release notes

Notes:

Copy link

@Rock1raw Rock1raw left a comment

Choose a reason for hiding this comment

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

Data info

@SoeAung95
Copy link

Margr

@SoeAung95
Copy link

Marge.and release

@3406Momo
Copy link

3406Momo commented Feb 9, 2025

search

@Nm774499 Nm774499 mentioned this pull request Feb 14, 2025
@Nm774499
Copy link

Unit B 644 Joseph E Lowery NW 30318 GA

@blackroseoneblackroseone

ssh -T git@github.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Branch Merge Results Differ Between Remote and Local
8 participants