OpenFn / OpenFn/kit

Projects: be smarter about detecting project files

Open
#1,061 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DevX
Dominant language
TypeScript
Stars
21
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
17

Description

When the Workspace reads the projects dir, right now it'll basically pull out all yaml files and assume they're project files.

But they might not be. If users are using their own project root, and particularly if they're using JSON formatted files, the projects folder could contain any old rubbish.

And right now if the Workspace finds a file that isn't a project file, it'll blow up. So we need to be more robust.

I've added a quick check to ignore openfn.yaml|json

Heuristics we might use:

  • The file should be in the format name@domain (this is annoying in some tests though, and do we want to be dogmatic about it?)
  • Duck type based on the top level keys - probably name, maybe id and workflows must be present
  • Just generally be more flexible: if we fail to load a Project from a file, just log a warning and move on. Don't let it blow us up

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Workspace logic that reads the projects directory and review the existing check for openfn.yaml and openfn.json. Compare the proposed filename, top-level-key, and load-failure heuristics against valid project files and unrelated YAML or JSON; done means unrelated files are ignored or warned about without crashing while valid projects still load.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.