feat: validate input on run#560
Conversation
B4nan
left a comment
There was a problem hiding this comment.
some tests would be nice, otherwise looking good
87ca352 to
49da417
Compare
|
Thanks @vladfrangu @netmilk please did you review this is consistent with the new CLI design? Guys, please assign Adam as reviewers to all PRs related to CLI, to ensure consistency with the new design |
| } | ||
| } | ||
|
|
||
| private async validateAndStoreInput(inputOverride?: Record<string, unknown>) { |
| } | ||
| }; | ||
|
|
||
| export const getDefaultsAndPrefillsFromInputSchema = (inputSchema: any) => { |
There was a problem hiding this comment.
Comments please, especially for exported functions
There was a problem hiding this comment.
I'll add these in a follow up PR
|
EDIT: Disregard this comment. This comment below is on a different topic. It belongs here: #577. Many apologies. @jancurn Yes, I've validated it in the E2E product vise. The flags interface design follows the new design style guide. But I've just noticed that piping to However, the canonical Note to self: That reminds me we should create a milestone and a plan for the transformation to the "new CLI design" and make the design a public, living document here in this repo. |
|
This PR was before our discussion about stdin flags @netmilk, I will fix it today in a subsequent release. Also this is about the |
|
@vladfrangu @jancurn Darn, my bad. 🤦♂️ Silly. Apologies. I'll look into it. |
|
@vladfrangu I need help figuring out whether this is even changing the interface. I assume it doesn't. But apart from that, it works as expected. Thank you! Shall we consider returning the JSON path (pointer) to the INPUT data structure in the error message in case it isn't flat? It's going to be hard to figure out which part of the input is failing the validation otherwise. I've noticed one minor thing, though. The |
|
Yep, that's the plan for today, could you maybe also make an issue for this so we have it fully tracked? 🙏 |
Closes #66
Still waiting on https://apify.slack.com/archives/G0134LE0JUB/p1714484758429109