-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: implement JSON inputs files in wdl-engine
.
#241
Conversation
This commit adds a types collection `Engine`, making it clear that any types exposed via the `Engine` API come from that singular collection.
This commit implements support for JSON input files in `wdl-engine`. The file format conforms to the WDL specification for JSON input files. Also adds stub methods to `Engine` for evaluating workflows and tasks; the implementation is forthcoming.
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.
Looks good to me!
/// The overridden requirements section values. | ||
requirements: HashMap<String, Value>, | ||
/// The overridden hints section values. | ||
hints: HashMap<String, Value>, |
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.
I didn't realize you could override hints. What's the use case for that? Spitballing: I guess it makes sense if an implementation leaves out a hints
section and you want to "fill it in" at runtime. But overriding specified values? That seems wrong to me, but maybe I'm just not thinking of the right use case.
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.
Yeah, both requirements and hints can be overridden and an engine must support doing so.
Probably useful for when you might have a bespoke container image you want to run someone else's task in or the environment you'll be running a task on would benefit from higher minimum/maximum cpu/memory/storage.
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.
We've written workflows
in a way that a user should never have to override a runtime/requirements value (or at least it should be rare), but that use case makes perfect sense to me. A task is failing due to too low a mem allocation? Override runtime.memory
.
But hints
??? Those don't seem like something that should be "messed with" by the user. But I haven't actually written any hints sections for production, so maybe I'm just thinking about it wrong.
@adthrasher just curious if you have thoughts on this. Seems an odd case to me.
Co-authored-by: Andrew Frantz <[email protected]>
Calculate display strings for requirement and hint types rather than using a hardcoded string.
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.
LGTM 👍
This PR implements support for JSON input files in
wdl-engine
.The file format conforms to the WDL specification for JSON input files.
Value coercion now returns errors for so users can better diagnose coercion
problems.
Also adds stub methods to
Engine
for evaluating workflows and tasks; theimplementation is forthcoming.
Before submitting this PR, please make sure:
changes (when appropriate).
CHANGELOG.md
(see"keep a changelog" for more information).