Workflows cli create cmd issues

Open
#1,288 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust
Domain
cli, tooling

Research direction

Start by tracing the workflows create command into generate_template_repo and copy_directory; inspect the fs::read_dir(src) calls and the handling of workflow_home/template-boilerplate/conventional-templates and helm-based-templates. Verify missing sources and copy failures propagate, YAML input is not made into a directory, and prerequisite checks happen before prompting.

Written by the indexing model from the issue text.

Description

Got 4 bugs:
1- Treating a YAML file as a directory name
eg: workflows create hello_cli_test.yaml
the program creates a directory named : hello_cli_test.yaml

2- Missing source directories are NOT treated as errors
It is assumed that these are always present :
workflow_home/template-boilerplate/conventional-templates
workflow_home/template-boilerplate/helm-based-templates

But in the instuled model they dont exist: fs::read_dir(src)

3- Errors are swallowed instead of propagated
The copy_directory function, prints ERRORS, returns, and Never signal a failure
generate_template_repo always returns Ok(())

4- User is prompted before prerequisites are validated
eg: ould you like to store conventional WorkflowTemplate manifests? Y
Operation cannot possibly succeed because there is no template, so it should check before asking.

Dominant language
Rust
Stars
7
Forks
6
Avg merge
1d 8h
Merged PRs (30d)
56

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.

More from DiamondLightSource/workflows

All issues in DiamondLightSource/workflows

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.