CLI: rethink step validation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 23
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 17
Description
The CLI has logic to validate the structure of a workflow.
The idea here is that if a user mis-types a key like "adapatator", the CLI will catch the error and flag them.
What with all the focus on sync and portability, it's way more likely that a workflow will be machine generated now, and so won't have those typos.
But if the app adds a new key to the workflow, the CLI will refuse to execute it - even if it's a step it doesn't care about.
I would like to think about the following options:
- Use the common portability spec schema to validate against. The app does have a JSON schema. If the workflow or owning project has aversion, use that, else use latest. This relates to https://github.com/OpenFn/lightning/issues/4734
- Add a
--validateflag which will validate a workflow for you, if you want it (a bit like a circle CI yaml linter app) - only validate keys that the CLI cares about, and ignore the rest
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the CLI's current workflow-structure validation entry point and inspect the existing JSON schema. Compare the three proposed approaches, including version selection for the common portability schema and the optional --validate flag. Done means the validation policy is defined clearly enough to distinguish typo detection from compatibility with newer workflow keys.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100