Skip to content

repo-updater: Migrate a repo without external and different name

Warren Gifford requested to merge core/unique-strikes-again into master

Created by: keegancsmith

We special case repositories that do not have an external repo set in our sync algorithm. We make an attempt to associate them with an existing repository. However, our algorithm had two short-comings resolved in this commit.

In the case that we associated it with a repository with a name in a different case the Update call would fail. So we remove the unneccessary in Update ensuring the name is the same. We could change this to using string.EqualFold. However, in every case we call Update we really do want to merge the two repositories. So the guard is unneccessary.

The other important change is that when we try to associate the repository we need to look up byName case insensitively. This bug has likely saved us before, since things would "just work" if the name in stored is already lower cased. In the case of a customer running into this issue, they likely had the byName lookup work, but the Update call fail.

This change will need to be cherry-picked to the 3.4, 3.5 and 3.6 release branches. However, we only know of one customer running into this issue. In that case we can not cherry-pick this everywhere to prevent unnecessary patch releases on older versions.

Merge request reports

Loading