-
Notifications
You must be signed in to change notification settings - Fork 59
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
vdk-core: termination message now idempotent #909
Conversation
Signed-off-by: mrMoZ1 <[email protected]>
Not sure ifidempotence is the word to use, the data job remains the same yet multiple different statuses are written sequentially during execution, yes? |
projects/vdk-core/src/vdk/internal/builtin_plugins/termination_message/file_util.py
Show resolved
Hide resolved
projects/vdk-core/src/vdk/internal/builtin_plugins/termination_message/file_util.py
Show resolved
Hide resolved
projects/vdk-core/src/vdk/internal/builtin_plugins/termination_message/file_util.py
Show resolved
Hide resolved
projects/vdk-core/tests/vdk/internal/builtin_plugins/termination_message/test_writer.py
Outdated
Show resolved
Hide resolved
projects/vdk-core/src/vdk/internal/builtin_plugins/termination_message/file_util.py
Show resolved
Hide resolved
projects/vdk-core/tests/vdk/internal/builtin_plugins/termination_message/test_writer.py
Outdated
Show resolved
Hide resolved
Signed-off-by: mrMoZ1 <[email protected]>
Signed-off-by: mrMoZ1 <[email protected]>
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.
If hook implementations have to be idempotent, the API docs should be clearly stating this. Does the API contract the idempotent implementation, or not?
I saw the idempotent hook implementation was a suggestion made, so I am unblocking the MR.
what: termination message plugin now overrides the previous message.
why: Some data jobs that make use of the Standalone Data Job end up with double termination message, e.g.,
'{"vdk_version": "0.3.572339461", "status": "Success"}{"vdk_version": "0.3.572339461", "status": "Success"}'
This confuses the Control Service, which therefore classifies the execution as Platform Error, even if the job is executed successfully.
testing: added unit tests
Signed-off-by: Momchil Zhivkov [email protected]