Page MenuHomePhabricator

Enrolling an existing device in a repository cluster has surprising effects and inconsistent severity
Closed, ResolvedPublic


When you enroll an existing repository device in the cluster, we stop updating non-cluster repositories on the device.

The major reasoning here is that we can't know if repositories "should be" on the device or not, and if we guess wrong we end up with bad cases like this for hosted repositories:

  • observe the repository does not exist yet;
  • create a new empty copy it;
  • mirror it somewhere, destroying an existing mirror.

This isn't really hugely bad, but looks hugely bad.

The documentation doesn't contradict this behavior, exactly, but definitely doesn't warn you about it. It should.

bin/repository update (and other sub-workflows, like bin/repository refs, etc) also don't check for this, but should check for it and raise a warning about it, and possibly refuse to proceed at all.

We could also try to guess better. For hosted and imported repositories, we could conceivably continue normally if the local working copy already exists on disk. This is a little bit magical but maybe fine at the end of the day.