-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insert a task that has met its suicide prerequisites #3282
Comments
I think I disagree with that. Or at least it is arguable.
Both of these should be expected, it seems to me. If upstream dependencies are no longer in the task pool, the inserted task's prerequisites can't be satisfied (short of manual manipulation or re-insertion of upstream tasks); and if they are still in the pool (and they satisfy the suicide prerequisite) why shouldn't the inserted task suicide immediately? |
Will be solved by spawn-on-demand, where there is no task pool. And if it's available in the data-store, then you only need to trigger the task.. Insertion then trigger would probably be combined I suppose (not sure what insertion represents without a pool otherwise) |
I wouldn't say "solved by spawn-on-demand" so much as "won't be an issue" then. But under the current regime, I don't agree that "Ideally, the inserted task should remain regardless." - because then you've got a task that's not removing itself even though its suicide prerequisites are satisfied. |
(But maybe @matthewrmshin will convince me 👍 ) |
I guess "insertion" would be more like queuing handler(s) for the inserted task(s)?
Fair point |
There might still be something like "insertion" under the hood (if there are still objects that represent individual active tasks) but it won't be exposed to users like now. |
This was an operational problem on our site last Thursday. Long story short, they discovered something wrong with the results of the succeeded branch, and so were trying to insert/re-run the family on the recovery branch. They were unable to do so due to this issue, and had to stop the suite and warm start the whole cycle. The main purpose of insert (as noted in #2643) is to re-run some tasks. For the tasks to suicide immediately (even when the suite is held) is unhelpful. |
Yes, but: what happens to an inserted task always depends on the state of its prerequisites. I don't see how this is fundamentally any different from an inserted task running immediately (because its normal prerequisites are satisfied) and the operator saying s/he doesn't want it to do that. We can't have tasks in the suite that are not doing what they are supposed to do when their prerequisites are satisfied. (Well, we could, but that would open a whole other can of worms). (We could delay suicide when the suite is held, but the suicide would still be actioned immediately once the suite is released). The right thing to do is to manipulate the state of upstream tasks appropriately before insertion - i.e. make the conditions right for the recovery branch to run. E.g. for this graph:
Your scenario is (I think): The right way to handle this is:
|
That's usually how I do it... |
That was what I recommended them to do, until I realised that they had a family A to family B graph. |
So was resetting the upstream family state not sufficient? (I might have to see an example to understand the problem)... if it isn't sufficient, what would you suggest is a good solution? Perhaps we need the option to insert tasks with additional prerequisites (normal and suicide) that can't be satisfied automatically by the suite, so that they wait for manual triggering no matter what (and regardless of upstream task status)?? |
The instruction to reset upstream is OK if there is a clear and obvious path. However, it may not be obvious under circumstances, e.g. if upstream consists of or/any logic. And the user really did not expect the inserted task to suicide while the suite was held. |
Yeah we should certainly change that. And also check that the held task doesn't just suicide immediately when released even if triggered while held.
Not sure what we should do in that case. |
@hjoliver I think this issue is fixed now we have re-flow? |
Yes, insertion is no longer a thing. |
Describe exactly what you would like to see in an upcoming release
On insertion of task that has met its suicide prerequisites, it currently does:
Ideally, the inserted task should remain regardless.
Additional context
I would have called this a bug if I can claim to have no knowledge of the internal working of the task pool, but I have lost the right to that claim now. 👓
Most likely solved by spawn-on-demand? See also #2143, #2643, #3226.
Pull requests welcome!
Not as easy as one would hope, or I would have done it by now. E.g. what should be the behaviour of the tasks that are then spawned by the inserted task?
The text was updated successfully, but these errors were encountered: