-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Plan Process #243
Improve Plan Process #243
Conversation
to return `Result`
`Result<Vec<Step>, anyhow::Error>
@icepuma As you can see, I started with updating the |
@@ -210,7 +211,7 @@ mod tests { | |||
..Default::default() | |||
}; | |||
|
|||
let steps = file_link_action.plan(&manifest, &contexts); | |||
let steps = file_link_action.plan(&manifest, &contexts).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use a ?
instead of the .unwrap()
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking that since this one is a test, .unwrap()
is a better option...if it's an error, it'll panic and fail the test anyway.
Errors that happen in the plan step will now be logged, and panics shouldn't happen when an action fails to plan.
Codecov Report
@@ Coverage Diff @@
## main #243 +/- ##
==========================================
- Coverage 45.65% 45.63% -0.02%
==========================================
Files 72 72
Lines 2510 2511 +1
==========================================
Hits 1146 1146
- Misses 1364 1365 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
I get a test failing in the test suite when I run it against this branch. I don't get a repro on the main branch.
Does our github actions not run the test suite? |
I'm submitting a
What is the current behaviour?
Currently, errors resulting from files not being found are not bubbled up and factored in to execution of steps
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
What is the expected behavior?
Missing files should be reported when necessary, and affect planning of steps
What is the motivation / use case for changing the behavior?
Better UX when files necessary for a step are missing or weren't created in a previous step
Please tell us about your environment:
Version (
comtrya --version
):Operating system: Windows 11/WSL2 Ubuntu 20.04