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

Fail fast on invalid playbook #207

Closed
adatzer opened this issue Jun 16, 2022 · 0 comments
Closed

Fail fast on invalid playbook #207

adatzer opened this issue Jun 16, 2022 · 0 comments

Comments

@adatzer
Copy link
Collaborator

adatzer commented Jun 16, 2022

At the moment, if a playbook has no targets or no steps provided, Run is still called from main.
Since Run returns TargetStatus, missing targets leads to various for loops being skipped, which makes it harder to reason about the return value, and ends up in No queries to run error.
Similarly for steps, which, if missing, []Step is nil, which goes unnoticed till runSteps (after the target client has been created).
Until we get to #149, we could just fail fast instead, with a more relevant error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant