Refresh Project Statistics When Removing a Fork Relationship
What does this MR do and why?
Refresh project statistics when removing a fork relationship. This also triggers a refresh of the namespace statistics.
The original goal of the issue was to trigger a namespace storage statistics update. However, it was noticed that removing a fork relationship does not trigger a project statistics recalculation either. Triggering a project statistics recalculation triggers in turn a namespace storage statistics update. So triggering a project recalculation seems like the right approach; we probably want to both recalculate the project statistics and the root namespace statistics.
Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/421752
Screen recordings
Notice that in the first video, I have to take some action that triggers a statistics update (in this case, I click the "Recalculate repository usage" button). In the second, I do not. The statistics are updated automatically when the fork relationship is removed.
Before | After |
---|---|
UnlinkForkStorageOnMaster | UnlinkForkStorageOnBranch |
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.