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)
Thu, Dec 19, 3:12 PM
Unknown Object (File)
Wed, Dec 18, 11:55 PM
Unknown Object (File)
Wed, Dec 18, 6:44 AM
Unknown Object (File)
Thu, Dec 12, 5:31 AM
Unknown Object (File)
Thu, Nov 28, 9:06 PM
Unknown Object (File)
Nov 20 2024, 4:30 AM
Unknown Object (File)
Nov 15 2024, 9:59 PM
Unknown Object (File)
Nov 13 2024, 6:19 PM
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
Branch
ha2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 12173
Build 15361: Run Core Tests
Build 15360: arc lint + arc unit

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.