Page MenuHomePhabricator

Provide a more consistent, mostly relaxed severity for updating non-cluster repositories on cluster devices
ClosedPublic

Authored by epriestley on May 12 2016, 9:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 8, 2:09 PM
Unknown Object (File)
Thu, Apr 4, 9:12 PM
Unknown Object (File)
Wed, Mar 27, 2:41 AM
Unknown Object (File)
Jan 25 2024, 6:48 PM
Unknown Object (File)
Jan 6 2024, 10:08 AM
Unknown Object (File)
Dec 26 2023, 6:11 PM
Unknown Object (File)
Dec 22 2023, 9:16 PM
Unknown Object (File)
Dec 22 2023, 11:53 AM
Subscribers
None

Details

Summary

Fixes T10940. Two issues currently:

First, PullLocal deamon refuses to update non-cluster repositories on cluster devices. However, this is surprising/confusing/bad because as soon as you enroll a repository host in the cluster, most of the repositories on it stop working until you clusterize them. This is especially confusing because the documentation gives you a very nice, gradual walkthrough about going through things slowly and being able to check your work at every step, but we really drop you off a bit of a cliff here. The workflow implied by the documentation is a desirable one.

This operation is generally only unsafe/problematic if the daemon would be creating a new working copy. If a working copy already exists, we can reasonably guess that it's almost certainly because you've enrolled a previously un-clustered host into a new cluster. This allows the nice, gradual workflow the documentation describes to proceed as expected, without any weird surprises.

Instead of refusing to update these repositories, only refuse to update them if updating would create a new working copy. This should make transitioning much smoother without any meaningful reduction in safety.

Second, the lower-level bin/repository update, refs, mirror, etc., commands don't apply this same check. However, these commands are potentially just as dangerous. Use the same code to do a similar check there, making sure we only operate on repositories that are either expected to be on the current device, or which already exist here.

Test Plan
  • Ran bin/phd debug pull, saw diagnostic information choose to update most repositories (including some non-cluster repositories) but properly skip non-cluster repositories that do not exist locally.
  • Ran bin/repository update, etc., saw the command apply consistent rules to the rules applied by PullLocal and refuse to update non-local repositories it would need to create.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Provide a more consistent, mostly relaxed severity for updating non-cluster repositories on cluster devices.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.May 12 2016, 10:46 PM
This revision was automatically updated to reflect the committed changes.