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

SNOW-1454926: statement.cancel method isn't available anymore in the latest release #850

Closed
matgott opened this issue May 29, 2024 · 5 comments
Assignees
Labels
bug Something isn't working status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. status-triage_done Initial triage done, will be further handled by the driver team

Comments

@matgott
Copy link

matgott commented May 29, 2024

Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!

  1. What version of NodeJS driver are you using? 1.11.0

  2. What operating system and processor architecture are you using? Ubuntu 20.04.3 LTS 64bits

  3. What version of NodeJS are you using?
    node 16.20.2
    npm 8.19.4

  4. What are the component versions in the environment (npm list)?

├── @automapper/[email protected]
├── @automapper/[email protected]
├── @automapper/[email protected]
├── @nestjs/[email protected]
├── @nestjs/[email protected]
├── @nestjs/[email protected]
├── @nestjs/[email protected]
├── @nestjs/[email protected]
├── @nestjs/[email protected]
├── @nestjs/[email protected]
├── @nestjs/[email protected]
├── @nestjs/[email protected]
├── @nestjs/[email protected]
├── @nestjs/[email protected]
├── @nestjs/[email protected]
├── @nestjs/[email protected]
├── @nestjs/[email protected]
├── @nestjs/[email protected]
├── @nestjs/[email protected]
├── @sendgrid/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @typescript-eslint/[email protected]
├── @typescript-eslint/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

5.Server version: xxx

  1. What did you do?

With the previous version I was able to do statement.cancel(). Now with version 1.11.0 cancel method is not available in the Statement types RawStatement | FileAndStageBindStatement

  1. What did you expect to see?

Being able to cancel a statement

@matgott matgott added the bug Something isn't working label May 29, 2024
@github-actions github-actions bot changed the title statement.cancel method isn't available anymore in the latest release SNOW-1454926: statement.cancel method isn't available anymore in the latest release May 29, 2024
@matgott
Copy link
Author

matgott commented May 29, 2024

Looking at the code I can see that BaseStatement still has the cancel method but the types are not exposing that so using typescript this won't work:

connection.execute({
  sqlText: "",
  binds: [],
  streamResult: true,
  complete: (err, statement) => {
    if (err) statement.cancel(); // I GET TS ERROR Property 'cancel' does not exist
  }
})

@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this May 30, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added the status-triage Issue is under initial triage label May 30, 2024
@sfc-gh-dszmolka
Copy link
Collaborator

hi and thank you for reporting this issue. seems to be a valid concern indeed. we'll fix it.

@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage_done Initial triage done, will be further handled by the driver team and removed status-triage Issue is under initial triage labels May 30, 2024
@sfc-gh-dszmolka
Copy link
Collaborator

PR in progress at #851

@sfc-gh-dszmolka sfc-gh-dszmolka added status-pr_pending_merge A PR is made and is under review labels Jun 4, 2024
@sfc-gh-dszmolka sfc-gh-dszmolka added status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. and removed status-pr_pending_merge A PR is made and is under review labels Jun 20, 2024
@sfc-gh-dszmolka
Copy link
Collaborator

PR is now merged and will be part of the next release

@sfc-gh-dszmolka
Copy link
Collaborator

released with Snowflake Node.JS driver v1.12.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

3 participants