Ref T13076. This will be used by the metric collection system to iterate over the cluster devices.
Details
- Reviewers
epriestley - Maniphest Tasks
- T13076: Plans: Phacility cluster caching, renaming, and rebalance/compaction
- Commits
- rP0bf0718fad27: Add isClusterDevice to Almanac query
Created some cluster and non-cluster devices, searched and saw expected results.
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
In the future, web, aux, etc., probably won't actually be bound to any cluster services. Maybe just pull every device, then filter them with a hard-coded check based on the name matching repo*.phacility.net or db*.phacility.net for now, and we can refine this later? I suspect this isn't actually the right check in the long term.
One reasonable version of this check in the near future might just be getAlmanacProperty('phacility.cloudwatch.enabled') or something. I think I'm going to write a beefier version of bin/provision sync pretty soon, once the new Almanac stuff deploys to admin.
src/applications/almanac/query/AlmanacDeviceSearchEngine.php | ||
---|---|---|
28 | For consistency, prefer PhabricatorSearchThreeStateField for true/false/null fields. |
I think this is fine to add anyway (with ThreeStateField) even if we don't actually use it now; the code otherwise looks right and the query capability might be useful.