lightning icon indicating copy to clipboard operation
lightning copied to clipboard

Generating project.yaml fails on certain projects

Open taylordowns2000 opened this issue 1 year ago • 1 comments

We have at least two edge cases that are creating failures on the exporter/cli openfn pull:

Duplicate Keys

This one was a known issue before, and we should likely solve it in the short term by enforcing unique names for all jobs in a project. I thought that this was done (maybe @elias-ba ?) a while ago, but apparently not.

image

Not a map when no workflows exist.

image

When a user first sets up github sync (or runs openfn pull) on a newly created project (which is a part of the migration path) this error will occur because there are no workflows in the project.

Checking https://app.openfn.org/api/provision/*** for existing project.
Project found.
[CLI] ♦ Downloading the project spec (as YAML) from the server.
[CLI] ✘ ERROR: invalid spec
[CLI] ✘ [
  {
    "message": "workflows: must be a map",
    "path": [
      "workflows"
    ]
  }
]
image

taylordowns2000 avatar Mar 18 '24 08:03 taylordowns2000

update here @stuartc , looks like this is not a bug with the exporter. (see test below) @josephjclark , we will need to update the CLI to accept cases where we try to import a project that does not yet contain any workflows. i'll investigate that side and open an issue

image

taylordowns2000 avatar Mar 18 '24 12:03 taylordowns2000

Closing this and opening #2494 to track the pending issue here.

christad92 avatar Sep 12 '24 10:09 christad92