Skip to content

Conversation

luisggc
Copy link

@luisggc luisggc commented Aug 2, 2025

Continue-on-Error Enhancements

Overview

  • Introduced optional flags to allow deployments to continue after script failures.
  • Full error messages are recorded and failed scripts are listed upon completion.
  • New flags are documented in the README so users can enable them via the CLI when needed.

Configuration

  • Added configuration fields to capture continue-on-error behavior.
  • Default behavior remains fail-fast unless explicitly enabled.
  • Exposed CLI options for:
    • versioned scripts
    • repeatable scripts
    • always scripts
    • all scripts
  • --continue-all-on-error acts as shorthand for enabling all script-type options.
  • If -- schemachange-no-jinja is present in the sql, skip the jinja parsing

Deployment Behavior

  • Deployment loop now:
    • Tallies failed scripts
    • Continues when configured
    • Reports a summary of failures before exiting

Testing

  • Deployment continues past a failing script when continue_versioned_on_error is set.
  • Failures are surfaced at the end of deployment.
  • Session logic:
    • Retries inserts
    • Ensures full error details are persisted

@zroytman
Copy link

zroytman commented Aug 3, 2025

Oh, I'm waiting for this enhancement so long time! It's great, thank you very much! How to speed it up to be moved to production (master)?

@zroytman
Copy link

zroytman commented Aug 3, 2025

@sfc-gh-tmathew Hi, who can approve the merge to master and when can it be done? Thanks a lot.

@luisggc
Copy link
Author

luisggc commented Aug 3, 2025

@zroytman , I don't think It will be reviewed anytime soon, apparently. There are a couple of PRs with no answer for many months. In the meantime I am using:
pip install "git+https://github.com/luisggc/schemachange.git@add-option-to-continue-on-script-error"

@zroytman
Copy link

zroytman commented Aug 4, 2025

@zroytman , I don't think It will be reviewed anytime soon, apparently. There are a couple of PRs with no answer for many months. In the meantime I am using: pip install "git+https://github.com/luisggc/schemachange.git@add-option-to-continue-on-script-error"

@luisggc do you know who should approve it? Who is the maintainer?

@luisggc
Copy link
Author

luisggc commented Aug 4, 2025

I think we have a few @sfc-gh-twhite merged a PR today, tough.
Please, help me understand what I can do in the PR to make It better.
I thought perhaps not adding the error msg to the table would make the code simpler.

@zroytman
Copy link

zroytman commented Aug 4, 2025

I think we have a few @sfc-gh-twhite merged a PR today, tough. Please, help me understand what I can do in the PR to make It better. I thought perhaps not adding the error msg to the table would make the code simpler.

Actually I've reviewed your list of changes and the explanation - it looks great for me. The writing of the error into the db table is not so mandatory for me in case you show the error on the screen during the execution - should be enough for me. But this is a great feature. Thank you so much! Hopefully it will be merged soon.

@sfc-gh-twhite
Copy link
Collaborator

Thanks for submitting this PR and for the review. I wanted to acknowledge that we will review this sometime this week. We're currently trying to close out a few other lingering things.

I agree that this is a useful feature and would like @sfc-gh-jhansen to review it as well to determine if it is something we should implement.

@luisggc luisggc force-pushed the add-option-to-continue-on-script-error branch from 356017e to 9cdb95b Compare August 5, 2025 01:52
@luisggc luisggc force-pushed the add-option-to-continue-on-script-error branch 2 times, most recently from 9acc4eb to 3d82ceb Compare August 5, 2025 13:08
@MACKAT05
Copy link
Contributor

MACKAT05 commented Aug 8, 2025

I wrote an adapter for the sqlfluff linter #342 that might preclude the need for this option by routing out syntax errors before deploy... also have you looked into dbt... parralelism and sequencing are handled there already...

@luisggc luisggc force-pushed the add-option-to-continue-on-script-error branch from 3d82ceb to 6487d71 Compare August 26, 2025 20:14
@zroytman
Copy link

Hi ALL. Any news regarding getting this awesome enhancement? Thanks.

@sfc-gh-tmathew sfc-gh-tmathew added the enhancement New feature or request label Aug 29, 2025
@sfc-gh-tmathew sfc-gh-tmathew self-assigned this Aug 29, 2025
@sfc-gh-tmathew
Copy link
Collaborator

@zroytman will take a look at this option and make the call by first week of september.

@zroytman
Copy link

@zroytman will take a look at this option and make the call by first week of september.

Hi @sfc-gh-tmathew , any updates? Thanks.

@zroytman
Copy link

@zroytman will take a look at this option and make the call by first week of september.

Hello @sfc-gh-tmathew , have you had a chance to look at this? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants