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

Add -continueOnError flag #94

Closed
wants to merge 1 commit into from
Closed

Add -continueOnError flag #94

wants to merge 1 commit into from

Conversation

jasiskis
Copy link

@jasiskis jasiskis commented Feb 2, 2017

The use case for this flag is the following:

We have a daily job that loads automatically ~500 tables, everything is generated programmatically (we generate DDL based on the Spark's Dataset Schema) and sometimes one of the loads fails, given that, all subsequent steps are skipped, this is not great for us because we have some next steps that must be run.

So the idea here is to add the possibility of continuing the execution of the subsequent steps but still return an error code at the end (and also tell which queries failed)

ps: I signed the CLA

This makes the playbook to be executed until the end even
with a failed step
@coveralls
Copy link

coveralls commented Feb 2, 2017

Coverage Status

Coverage decreased (-0.09%) to 32.497% when pulling e4d26c9 on andremidea:ignore-failures into 0ae72da on snowplow:master.

@snowplowcla
Copy link

Confirmed! @andremidea has signed the Individual Contributor License Agreement

@pepijn
Copy link

pepijn commented Mar 15, 2017

Can we do anything to have this PR merged? :-)

Copy link

@BenFradet BenFradet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall except for a couple of nits 👍

0.6.0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will take care of that ourselves 👍

@@ -25,7 +25,7 @@ import (
const (
CLI_NAME = "sql-runner"
CLI_DESCRIPTION = `Run playbooks of SQL scripts in series and parallel on Redshift and Postgres`
CLI_VERSION = "0.5.2"
CLI_VERSION = "0.6.0"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@@ -65,6 +66,7 @@ func (o *Options) GetFlagSet() *flag.FlagSet {
fs.Var(&(o.variables), "var", "Variables to be passed to the playbook, in the key=value format")
fs.StringVar(&(o.fromStep), "fromStep", "", "Starts from a given step defined in your playbook")
fs.BoolVar(&(o.dryRun), "dryRun", false, "Runs through a playbook without executing any of the SQL")
fs.BoolVar(&(o.continueOnError), "continueOnError", false, "Continues execution even a step fails, the exit code will still be different than 0")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

even if a step fails

@jasiskis jasiskis closed this Aug 21, 2018
@jasiskis jasiskis deleted the ignore-failures branch August 21, 2018 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants