Repository navigation
Conversation
|
I don't think so? Perhaps you can say more about what you were intending to do here |
|
This should address #2525 and #2524 (PR #2845 can probably be closed, as this builds on top of it). The first commit removes the reconnection trigger when the worker receives The second commit moves the heartbeat to the long running connection between worker and scheduler. Some adjustments had to be made to the tests so that they would wait for the heartbeat response from the scheduler. @mrocklin what do you think? |
|
In principle it seems fine
These adjustments are, I think, too invasive. We wouldn't expect a beginner dev to know how to add these if they were making a new test on something as unrelated as dashboard code. As an alternative, perhaps this? #2525 (comment) |
I am not too comfortable with it, either. It can be simplified however, perhaps using something like: and calling I'd appreciate suggestions in this regard. Regarding the alternative you propose, it would probably fix the issue, but @pacman82 and I moved the heartbeat to the long running connection as we thought adding another route which would function as keep-alive would increase complexity while not adding more value |
|
I've updated the last commit, now it only replaces the line |
Previously we could expect a heartbeat to have occurred before a worker had started. I don't think that we should relax this condition. My concern isn't only on dashboard tests, but on the full system. This seems like a regression to me. |
I agree that ideally heartbeats should play this role, but the complexity of #2907 seems to be much less than the complexity that we've had to go through here. |
What's the rationale behind this? |
I'm not sure that this was intentional originally, but the fact that some tests failed when we took this away means that some functionality implicitly depended on it. I suspect that functionality outside of our test suite also depends on it. Looking at the tests it seems like the scheduler would like to have metrics from workers as soon as they arrive? |
That PR is, from my perspective, very simple to maintain. Adding new routes is cheap (especially if they don't do anything). Adding PeriodicCallbacks is cheap. Changing how we do heartbeats is more uncertain and more likely to have unexpected consequences. |
I realized that previously the |
|
Essentially, though, the heartbeat works in the same way, except that the communication channel is different and that the heartbeat waits for The difficult thing (for me, at least) in this case is to wait for the heartbeat to have completed: previously a simple |
|
Do the other solutions work? If so, I'm inclined just to go with them if that's ok. |
|
I didn't yet test it for the HAProxy situation but I'm pretty sure they will. I respect your decision on this matter. |
|
This was resolved in another PR. Closing. Thanks @pacman82 for raising this. Thanks @martindurant for the nudge. |
Is this enough to address #2524