Closed johnsca closed 7 years ago
@johnsca I don't see anything here that deals with the scenario you mentioned earlier: "What about the case of calling add_unit() and then sentry.wait(), but the unit not yet showing up at all in status and thus wait() immediately returning?"
@tvansteenburgh Regarding wait returning immediately after add_unit, I don't see a way around that other than passing a list into wait_for_statuses or wait_for_messages to enforce a specific number of units.
I feel like we're quickly converging on the realm of Tangle and needing a DSL to describe the "expected state of the system" and just say "wait for delta from current to expected state to be zero."
@johnsca Well we know how many units of the service we should have at that point, so we could make a private sentry._wait_for_units(...) or something.
I updated the PR to resolve merge conflicts, handle added units, reference regexps in the wait_for_statuses docstring, and address other items in review.
Hi all -- could we take another pass at this? or land #114?
Hi @johnsca -- Any update on this? #114 is ready and willing to land as well.
Removed implicit wait from add_unit (fixes #105 though it may need test changes to ensure proper wait).
Also added wait_for_statuses to wait against workload statuses to go along with waiting against workload status messages.