-
Notifications
You must be signed in to change notification settings - Fork 80
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
fix default event port behavior along with FileDescriptorActivity #320
fix default event port behavior along with FileDescriptorActivity #320
Conversation
9827e7c
to
a326541
Compare
a326541
to
e33e084
Compare
With the introduction of the work() method, which allowed to be more precise on what gets called in which condition, an event port under FileDescriptorActivity would not make updateHook get called anymore. This broke the Rock workflow with file descriptor activities. (Un)fortunately, the effect has been subtle enough to not be noticed readily. Or people started deploying tasks under the normal Activity where before it would work with the FDA (I'm guilty of that). This is a rather convoluted code path (the characters in the play are a FileDescriptorActivity 'FDA', ExecutionEngine 'EE' and a TaskContext 'TC' - the port signal calls FDA::trigger() - FDA::trigger() wakes-up the FDA loop, which calls EE::work(Trigger) - EE::work(Trigger) calls EE::processPortCallbacks but NOT EE::processHooks (expected from the work() refactoring) At that point, we have to remember that TC::addEventPort registers a port callback that by default calls TC::trigger(). The comment at that point in the code itself says "default schedules an updateHook" (which we're indeed expecting with a FDA) - so, EE::processPortCallbacks in the end calls TC::trigger - which, by default calls FDA::timeout And FDA::timeout() was not implemented.
e33e084
to
c949974
Compare
c949974
to
67bd595
Compare
The first commit has a mix of whitespace fixes, refactoring, and some actual changes. Can you indicate what the actual changes in behavior are? It's hard to pull that out of the noise ... |
This is the change: FDA::timeout is now implemented so that work(Timeout) gets called. |
Unfortunately I don't have time at the moment to check in detail, but please check my existing PR which partially refactored the With your patch It is correct that |
@meyerj thanks for the long explanation. It nicely confirms the data flow I thought was happening, always good. The original behavior was intentional. This is a major breakage for rock. I did understand the intent of the change to work, and am definitely not contesting that. This is meant to restore pre- As for the other pull request ... I'm not sure what you expect me to do with it (except from reviewing it, which I just did) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@meyerj thanks for the long explanation. It nicely confirms the data flow I thought was happening, always good.
The original behavior was intentional. This is a major breakage for rock. I did understand the intent of the change to work, and am definitely not contesting that. This is meant to restore pre-
work
behavior that we rely on.
Okay. I do not see an immediate problem is we still support user triggers with TaskCore::trigger()
or FileDescriptorActivity::timeout()
, and the unit test makes sense and passes, too.
As for the other pull request ... I'm not sure what you expect me to do with it (except from reviewing it, which I just did)
Yes, exactly. I was not sure anymore whether it would conflict conceptually or maybe already solved your problem in another way. But apparently this is not the case and the small merge conflicts can be resolved easily.
So LGTM!
With the introduction of the work() method, which allowed to
be more precise on what gets called in which condition,
an event port under FileDescriptorActivity would not make
updateHook get called anymore.
This broke the Rock workflow with file descriptor activities.
(Un)fortunately, the effect has been subtle enough to not be
noticed readily. Or people started deploying tasks under the
normal Activity where before it would work with the FDA (I'm
guilty of that).
This is a rather convoluted code path (the characters in the
play are a FileDescriptorActivity 'FDA', ExecutionEngine 'EE'
and a TaskContext 'TC'
EE::processHooks (expected from the work() refactoring)
At that point, we have to remember that TC::addEventPort registers
a port callback that by default calls TC->trigger(). The
comment at that point in the code itself says "default schedules
an updateHook" (which we're indeed expecting with a FDA)
Until now, FDA::timeout() was not implemented. This PR implements it.