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

Update connections.py so it doesn’t run anything after its canceled #716

Merged
merged 5 commits into from
Aug 5, 2023

Conversation

julio-romero
Copy link
Contributor

resolves #711
docs

Problem

The queries arent cancelled after typing ctrl + c in console, this might have several performance issues

Solution

Changed the cancel command from

system$abort_session(session_id)

to

system$cancel_all_queries(session_id)

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@julio-romero julio-romero requested a review from a team as a code owner August 1, 2023 17:51
@cla-bot
Copy link

cla-bot bot commented Aug 1, 2023

Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA.

In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR.

CLA has not been signed by users: @julio-romero

@cla-bot cla-bot bot added the cla:yes label Aug 3, 2023
@mikealfare
Copy link
Contributor

@julio-romero Could you please add a changie for this update? I would classify this as a bug in the changie.

@dbeatty10
Copy link
Contributor

@julio-romero and @mikealfare I just pushed two changes:

  • small update to (hopefully) pass CI
  • changelog entry

I didn't give a ton of thought to the verbiage in the changelog entry, so feel free to update it as-needed.

@mikealfare mikealfare removed the request for review from nathaniel-may August 5, 2023 19:14
@mikealfare
Copy link
Contributor

mikealfare commented Aug 5, 2023

Integration tests are getting skipped. I created a branch with these changes in dbt-labs to run the integration tests. Results are here: https://github.com/dbt-labs/dbt-snowflake/actions/runs/5772393775

Results: ✅

@mikealfare mikealfare merged commit fd28b35 into dbt-labs:main Aug 5, 2023
@jomccr
Copy link

jomccr commented Aug 5, 2023

Can somebody test this on a real snowflake model and verify that the fix actually works? I wasn't able to get my local build of the dbt-snowflake adapter actually working.

mikealfare pushed a commit that referenced this pull request Aug 11, 2023
…716)

* Update connections.py so it doesn’t run anything after its canceled
* Update expected cancellation query
* Changelog entry

---------

Co-authored-by: Mike Alfare <[email protected]>
Co-authored-by: Doug Beatty <[email protected]>
(cherry picked from commit fd28b35)
Fleid pushed a commit that referenced this pull request Aug 12, 2023
…716) (#738)

* Update connections.py so it doesn’t run anything after its canceled
* Update expected cancellation query
* Changelog entry

---------

Co-authored-by: Mike Alfare <[email protected]>
Co-authored-by: Doug Beatty <[email protected]>
(cherry picked from commit fd28b35)

Co-authored-by: julio-romero <[email protected]>
philippe-boyd-maxa pushed a commit to maxa-ai/dbt-snowflake that referenced this pull request Nov 27, 2023
…bt-labs#716)

* Update connections.py so it doesn’t run anything after its canceled
* Update expected cancellation query
* Changelog entry

---------

Co-authored-by: Mike Alfare <[email protected]>
Co-authored-by: Doug Beatty <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants