Page MenuHomePhabricator

Allow repository cluster bindings to be marked as not "writable", making them read-only
ClosedPublic

Authored by epriestley on Apr 12 2018, 9:08 PM.
Tags
None
Referenced Files
F18740582: D19357.id46316.diff
Thu, Oct 2, 4:05 AM
F18735182: D19357.id46307.diff
Wed, Oct 1, 12:11 AM
F18617566: D19357.id.diff
Sun, Sep 14, 9:32 PM
F18598375: D19357.diff
Sat, Sep 13, 4:54 AM
F18509564: D19357.id.diff
Sep 5 2025, 3:28 AM
F18502689: D19357.diff
Sep 4 2025, 10:36 PM
F18367259: D19357.id.diff
Aug 27 2025, 11:24 PM
F18366239: D19357.id46316.diff
Aug 27 2025, 10:04 PM
Subscribers
None

Details

Summary

Depends on D19356. Fixes T10883. Ref T13120.

  • Add a "writable" property to the bindings, defaulting to "true" with a nice dropdown.
  • When selecting hosts, allow callers to request a writable host.
  • If the caller wants a writable host, only return hosts if they're writable.
  • In SVN and Mercurial, we sometimes return only writable hosts when we could return read-only hosts, but figuring out if these request are read-only or read-write is currently tricky. Since these repositories can't really cluster yet, this shouldn't matter too much today.
Test Plan
  • Without any config changes, viewed repositories via web UI and pushed/pulled via SSH and HTTP.
  • Made all nodes in the cluster read-only by disabling "writable", pulled and hit the web UI (worked), tried to push via SSH and HTTP (got errors about read-only).
  • Put everything back, pulled and pushed.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

  • Document the slightly fancier cluster contraction process.
This revision is now accepted and ready to land.Apr 12 2018, 9:56 PM
This revision was automatically updated to reflect the committed changes.

See T13611. This was broken by D20775 (September 2019) until D21576 (February 2021).