-
Notifications
You must be signed in to change notification settings - Fork 69
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
tests: unit tests for workflows/tasks/submission #2313
tests: unit tests for workflows/tasks/submission #2313
Conversation
Bugs uncovered while writing these tests:
|
Design problems encountered while writing these tests:
* Note also that this logic is subtly different from the one in |
Given the workflow engine we are employing, what better pattern would you propose? |
Enforce dependencies in code. If task A logically requires task B to be run before it (for example: B is a machine learning algorithm, A persists its results in the record) this must be enforced in code. How? Strong conventions on naming things, ban the use of patterns like |
Actually that makes me think that the object passed around doesn't need to be really a dictionary, so we could pass an actual object with dedicated properties/methods that can then enforce the conventions. Only issue would be serialization in the DB. But shouldn't be impossible, to just serialize as dictionary and reinstantiate back as full-fledged object. |
Or more simply, indeed we can have setters and getters that receive the |
I'm curious, why do you think that doing that (banning the usage of .get) is enforcing in code dependencies between tasks? |
To avoid failing silently. The problem is in patterns like foo = extra_data.get('foo')
if foo:
... because this is not enforcing a dependency on |
That can be easily avoided with |
That was my point! |
Sorry, I missed that point XS |
...and in fact: https://sentry.cern.ch/inspire-sentry/inspire-labs/group/822209/ |
Signed-off-by: Jacopo Notarstefano <jacopo.notarstefano@gmail.com>
Signed-off-by: Jacopo Notarstefano <jacopo.notarstefano@gmail.com>
Signed-off-by: Jacopo Notarstefano <jacopo.notarstefano@gmail.com>
Signed-off-by: Jacopo Notarstefano <jacopo.notarstefano@gmail.com>
Signed-off-by: Jacopo Notarstefano <jacopo.notarstefano@gmail.com>
Signed-off-by: Jacopo Notarstefano <jacopo.notarstefano@gmail.com>
Signed-off-by: Jacopo Notarstefano <jacopo.notarstefano@gmail.com>
Victim of #2385. |
Addresses #1773
add_note_entry
close_ticket
create_ticket
filter_keywords
prepare_files
prepare_keywords
remove_references
reply_ticket
submit_rt_ticket
send_robotupload
wait_webcoll