soundcloud/visor — pull request #106 by xla (2013-11-28 18:42:21+00:00)
Title: Only consider instances with same env for scale

After the introduction of the new env dimension it turned out that the scale behaviour wasn't adjusted completely. Leading to confusion and harmful results as reported in soundcloud/bazooka/issues/86. In order to provide consistent behaviour the `Scale` method exclusively takes instances with a matching `env` into consideration for ticket creation.

For `app-proc@rev` tuples with a great amount of existing instances this will introduce a performance regression as we move from a single list dir for the `proc-rev` bucket to a retrieval of all instances with their extended sub-tree. There is room to optimise this bottleneck by parallelising the retrievals, which is postponed to keep reasoning about this change-set simple.

/rfr @bernerdschaefer @grobie @typingduck

* * *
*The commits in this branch will be cleaned up in time and likely stashed to a single coherent change-set*