Homec4science

Provide a more consistent, mostly relaxed severity for updating non-cluster…

Authored by epriestley <git@epriestley.com> on May 12 2016, 23:22.

Description

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

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.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10940

Differential Revision: https://secure.phabricator.com/D15902

Details

Committed
epriestley <git@epriestley.com>May 13 2016, 00:51
Pushed
aubortJan 31 2017, 17:16
Parents
rPHbd9bcaa8ffea: Improve HTML mail rendering of inline patches
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH984dff0ae335: Provide a more consistent, mostly relaxed severity for updating non-cluster… (authored by epriestley <git@epriestley.com>).May 13 2016, 00:51