Workflow types don't seem right
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 23
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 17
Description
I want to do a deep dive on Project and figure out some type things.
A lot if it is around the adaptor key on a step.
Remember we have several representations of a project:
- v1 provisioner state: this is the JSON file that lightning expects.
- v2 project.yaml. This is what gets written to
main@openfn.org.yaml. The same structure get written toworkflow.yaml - The Execution plan used internally by the runtime. This is basically
{ workflow, options }pair. Note that it supportsadaptorsas an array.
Typings we have right now aren't really honest. The lexicon is a bit confused and confusing.
Maybe the lexicon needs to break up core into:
- runtime.dts
- project-v1.dts
- project-v2.dts
And be very very mindful about each type definition, duplicating everything so they're all self contained, and validating each.
I suppose project-v1.d.ts might just be an alias for lightning.d.ts, not sure.
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 by reading the existing lexicon and lightning.d.ts, then compare the v1 provisioner state, v2 project.yaml, and runtime execution-plan representations. Evaluate whether the types should be split into runtime.d.ts, project-v1.d.ts, and project-v2.d.ts, with each representation self-contained and validated; done means the distinctions and adaptor forms are accurately modeled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100