Skip to content
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

Exit plan on first failed task #6

Open
rtyler opened this issue Jan 1, 2021 · 2 comments
Open

Exit plan on first failed task #6

rtyler opened this issue Jan 1, 2021 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@rtyler
Copy link
Owner

rtyler commented Jan 1, 2021

❯ RUST_LOG=info ./target/debug/zap plan examples/basic.zplan -t bsd
Running plan with: PlanOpts { plan: "examples/basic.zplan", targets: "bsd", dry_run: false }
 ERROR zap_model::plan > Failed to parse task: Error { variant: CustomError { message: "No such file or directory (os error 2)" }, location: Pos(0), line_col: Pos((1, 1)), path: None, line: "", continued_line: None }
 ERROR zap_model::plan > Failed to parse task: Error { variant: CustomError { message: "No such file or directory (os error 2)" }, location: Pos(0), line_col: Pos((1, 1)), path: None, line: "", continued_line: None }
 ERROR zap_model::plan > Failed to parse task: Error { variant: CustomError { message: "No such file or directory (os error 2)" }, location: Pos(0), line_col: Pos((1, 1)), path: None, line: "", continued_line: None }
 INFO  zap             > Plan located, preparing to execute

Basically after that first one zap should bail

@rtyler rtyler added bug Something isn't working good first issue Good for newcomers labels Jan 1, 2021
@ssimontis
Copy link

Does there need to be some sort of "grace" to the exit? Like any errors reported from the task, the machine on which the plan failed, count of tasks executed vs remaining, etc?

And should a failure on one host cause all hosts to stop their work, or should other hosts attempt to continue forward and attempt the same step?

@rtyler
Copy link
Owner Author

rtyler commented Jan 9, 2021

@ssimontis reporting errors and the target that failed is a good idea. I intend to eventually make the plan command run against targets in parallel, so I think at most the failures of a task should/could only exit out of the plan execution for the target which fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants