Projects: be smarter about detecting project files
Nobody has claimed this yet.
- 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, maybeidandworkflowsmust 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
- 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 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