add-option-to-continue-on-script-error#339
add-option-to-continue-on-script-error#339luisggc wants to merge 3 commits intoSnowflake-Labs:masterfrom
Conversation
|
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)? |
|
@sfc-gh-tmathew Hi, who can approve the merge to master and when can it be done? Thanks a lot. |
|
@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: |
@luisggc do you know who should approve it? Who is the maintainer? |
|
I think we have a few @sfc-gh-twhite merged a PR today, tough. |
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. |
|
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. |
356017e to
9cdb95b
Compare
9acc4eb to
3d82ceb
Compare
|
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... |
3d82ceb to
6487d71
Compare
|
Hi ALL. Any news regarding getting this awesome enhancement? Thanks. |
|
@zroytman will take a look at this option and make the call by first week of september. |
Hi @sfc-gh-tmathew , any updates? Thanks. |
Hello @sfc-gh-tmathew , have you had a chance to look at this? Thanks. |
|
Hi All! Any updates regarding the approval? Thanks. |
|
I'm hopeless... any news regarding the implementation of the feature? |
|
@sfc-gh-jhansen @sfc-gh-tmathew - Is this functionality something we want to support for the general project? |
|
Hey there @luisggc and @zroytman, thanks for your interest in this. Can you please help us understand the use case for this feature? In general, the point of imperative tools with dependency ordering (versioned scripts in schemachange) is to make sure that the scripts don't run out of order. So if a script failed, it seems like we would not want to continue. But I'm curious what the use case you have in mind is here. |
Hi @sfc-gh-jhansen . As I've described in #230 and #239, I'm using SchemaChange as part of Azure DevOps Pipeline deployment, where I'm trying to deploy several sql scripts. In most of the cases the scripts have no dependencies between each other, but SchemaChange stops deployment on the first failure and doesn't proceed with the other scripts. Thanks a lot. |
|
Hi @sfc-gh-jhansen , any news? Thanks. |
|
Hi @luisggc, Thank you for this contribution! We've just released 4.3.0 which includes some related functionality, so I wanted to clarify the current state and what's still valuable from your PR. What 4.3.0 Already Includes
What's Still Valuable from This PRThe continue-on-error for R and A scripts is still a requested feature (issues #239, #230) that we'd like to include. However, we have design requirements: Design Constraints (from our spec)
Rationale: Versioned scripts have ordering dependencies - V2 may depend on V1 succeeding. The Required Changes
Regarding
|
|
@sfc-gh-tmathew Thanks for the update. Although you said that you've released version 4.3.0, I see we're using version 4.0.1 (every run process we're pulling the latest version, so looks like 4.0.1 is the latest pullable version, correct me if I'm wrong). |
|
@sfc-gh-tmathew My fault... my Python version was too old. Just upgraded it and got the latest version of SchemaChange. |
@sfc-gh-tmathew But now i have another issue: for some reason upgrading of SchemaChange from 4.0.1 to 4.3.1 causes all the scripts to be re-deployed (tried it in dry-run mode). If i use back the old version 4.0.1 (again in dry-run mode), the scripts aren't being re-deployed. Why is it happening? Why upgrading of the SchemaChange is redeploying all the already deployed (existing in schemachange history table) scripts? Probably the reason is the difference between the checksum calculations of 4.0.1 and 4.3.1 - but how could it be? |
|
@zroytman Thanks for the detailed report! I've investigated and confirmed a new issue - this is separate from the #414 fix. Opened issue #417 to track this: Root Cause IdentifiedThe checksum difference between 4.0.1 and 4.3.1 is caused by trailing semicolon handling changes, NOT the trailing comment fix:
Test Script-- Test R-script without trailing comment
CREATE OR REPLACE VIEW test_view2 AS
SELECT 1 AS col1, 'test' AS col2;Render Output Comparison4.0.1 content ends with: This is a different regression from #414 (which addressed trailing comments). ImpactAll scripts ending with a semicolon (most scripts) will have different checksums in 4.3.1 compared to earlier versions, causing:
WorkaroundFor now, stay on 4.2.0: pip install schemachange==4.2.0Next StepsWe're investigating the code changes and will determine whether this requires a 4.3.2 hotfix or can be addressed in 4.4.0. Will update #417 with our findings and timeline. @sfc-gh-jhansen - This appears to be related to the trailing comment fix changes that may have inadvertently affected how statements are trimmed before checksum computation. Regarding PR #339@luisggc - This PR still has merge conflicts with
If you need help resolving the merge conflicts, feel free to reach out and we can assist. |
|
Thanks, @sfc-gh-tmathew , for opening a new issue #417 . |
Thanks, @sfc-gh-tmathew . As i mentioned in #417 , the version 4.3.2 is working great now, thanks! |
Hi @luisggc , any updates or ETA regarding such a great enhancement you've developed? Thanks. |
|
Hi all! i had my notifications off. I'll resolve the conflict and deal with the feedback. |
|
@zroytman changes done. Let me know if I have to undo some version change i have done in this PR likeI have done in |
|
Not in master. They still need to review, but I have made the necessary changes.
|
|
Thank you again, @luisggc . Hi @sfc-gh-tmathew , who can approve the PR? Thanks. |
|
Hi @sfc-gh-tmathew , any updates regarding reviewing the PR and pushing to master? |
|
Hey @luisggc, Thanks for putting this together — appreciate the contribution. The continue-on-error logic itself makes sense and the approach is sound. I do want to flag a few things before we can merge. Move the
|
|
Dear @luisggc & @sfc-gh-tmathew , I'm hopeless. Looks like we will never see such a great enhancement in production. |

Continue-on-Error Enhancements
Overview
Configuration
continue-on-errorbehavior.repeatablescriptsalwaysscriptsallscripts--continue-all-on-erroracts as shorthand for enabling all script-type options (except versioned).-- schemachange-no-jinjais present in the sql, skip the jinja parsing--continue-all-on-error--continue-repeatable-on-error--continue-always-on-errorDeployment Behavior
Testing
continue_versioned_on_erroris set.