Skip to content

Workflow types don't seem right #1381

@josephjclark

Description

@josephjclark

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:

  1. v1 provisioner state: this is the JSON file that lightning expects.
  2. v2 project.yaml. This is what gets written to main@openfn.org.yaml. The same structure get written to workflow.yaml
  3. The Execution plan used internally by the runtime. This is basically { workflow, options } pair. Note that it supports adaptors as 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    New Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions