question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: Wishlist #8 Validating Task inputKeys and outputKeys

See original GitHub issue

I was hoping I would be able to contribute to this open source project, and I wanted to ask if what I had planned for the validation would be enough or was there more to the validation that was intended for this. What I had planned is simply adding a @NotEmpty(message = "") On the inputkeys and outputKeys fields on TaskDef.java file.My reasoning for doing something so simple is because in your documentation on the fourth bullet point it states that

In the future, this can be extended to be a strict template that all task implementations must adhere to …

My understanding was that users creating tasks would need to have these fields populated to be able to document what is needed for a task to be run and what you can expect it to output once finished, making it easier for re-use. Looking forward to your response, Thank you.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mashurexcommented, Nov 7, 2019

I would think that using something more flexible than an annotation on the classes would be required for input/output keys, as they’re dynamic to each task defined in the system. Using JSON Schema or having a way to describe validation requirements on the task def (or in the workflow def) would make this much more flexible.

For our custom implemented tasks, we validate task inputs in the start and/or execute methods. A few times we’ve created a data validation tasks that sit between two ‘real’ tasks in the workflow for this very purpose as well.

1reaction
andrea11commented, Jul 4, 2019

Hello @cclulu, Me and my team, we are currently using JSON schema to make validation possible on some inputs. And my feedback is really positive. Allow to describe workflow inputs and task inputs with JSON schema, can give the possibility to perform a wide and deep validation, on types, constraints and even conditional dependencies among inputs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OutputKeys (Java Platform SE 8 ) - Oracle Help Center
Provides string constants that can be used to set output properties for a Transformer, or to retrieve output properties from a Transformer or...
Read more >
Evolution of Netflix Conductor:. v2.0 and beyond
Validating Task inputKeys and outputKeys. This is to provide type safety for tasks and define a parameterized interface for task definitions ...
Read more >
Evolution of netflix conductor - SlideShare
Validating Task inputKeys and outputKeys This is to provide type safety for tasks and define a parameterized interface for task definitions such that...
Read more >
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF ...
As I have specified UTF-8 directly, the locale should not matter, but to answer your question directly, the test code is invoked as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found