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-982536: connection.getQueryStatusThrowIfError() is not throwing an error #719

Closed
TimShilov opened this issue Dec 1, 2023 · 7 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.

Comments

@TimShilov
Copy link

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

  2. What operating system and processor architecture are you using?
    MacOS 14, ARM (Apple M1 Pro)

  3. What version of NodeJS are you using?
    20.10.0

  4. What did you do?

I'm trying the new asyncExec flag introduced in #672.

  • Execute a query with incorrect syntax using asyncExec: true
  • Get queryId
  • Wait for that query to finish
  • Run await connection.getQueryStatusThrowIfError(queryId);

All the code I'm running I'm talking from the test (test/integration/testExecuteAsync.js).

  1. What did you expect to see?

I expected error to be thrown. Instead I can see that the status is error but it's not thrown.
Screenshot 2023-12-01 at 13 53 33

  1. Can you set logging to DEBUG and collect the logs?
{"level":"DEBUG","message":"[1:56:10.583 PM]: Contacting SF: /session/v1/login-request?requestId=c8f3c320-ae29-4d79-a7c6-08520d09af32&warehouse=STAGING_WH&databaseName=AGENCY_DEVELOP_TIM&schemaName=PUBLIC, (1/7)"}
{"level":"TRACE","message":"[1:56:10.584 PM]: Create and add to cache new agent https://xe29001.us-central1.gcp.snowflakecomputing.com:443-keepAlive"}
{"level":"TRACE","message":"[1:56:10.584 PM]: CALL POST with timeout 90000: https://xe29001.us-central1.gcp.snowflakecomputing.com/session/v1/login-request?requestId=c8f3c320-ae29-4d79-a7c6-08520d09af32&warehouse=STAGING_WH&databaseName=AGENCY_DEVELOP_TIM&schemaName=PUBLIC"}
{"level":"TRACE","message":"[1:56:10.664 PM]: socket reused = false"}
{"level":"DEBUG","message":"[1:56:10.670 PM]: Reading OCSP cache file. /Users/tim.shilov/Library/Caches/Snowflake/ocsp_response_cache.json"}
{"level":"TRACE","message":"[1:56:10.702 PM]: Returning OCSP status for certificate 06B480EC940D8A0C485E59237E918844 from cache"}
{"level":"TRACE","message":"[1:56:10.704 PM]: Returning OCSP status for certificate 0CF5BD062B5602F47AB8502C23CCF066 from cache"}
{"level":"TRACE","message":"[1:56:10.705 PM]: OCSP validation succeeded for xe29001.us-central1.gcp.snowflakecomputing.com"}
{"level":"DEBUG","message":"[1:56:11.030 PM]: --createStatementPreExec"}
{"level":"DEBUG","message":"[1:56:11.030 PM]: -- binds.length= 0"}
{"level":"DEBUG","message":"[1:56:11.030 PM]: numBinds = 0"}
{"level":"DEBUG","message":"[1:56:11.031 PM]: threshold = 65280"}
{"level":"DEBUG","message":"[1:56:11.031 PM]: RowStatementPreExec"}
{"level":"DEBUG","message":"[1:56:11.031 PM]: context.bindStage=undefined"}
{"level":"TRACE","message":"[1:56:11.031 PM]: Get agent with id: https://xe29001.us-central1.gcp.snowflakecomputing.com:443-keepAlive from cache"}
{"level":"TRACE","message":"[1:56:11.031 PM]: CALL POST with timeout 90000: https://xe29001.us-central1.gcp.snowflakecomputing.com/queries/v1/query-request?requestId=a2cf69f8-2513-480c-9d22-cb33c4793101"}
{"level":"TRACE","message":"[1:56:11.177 PM]: Get agent with id: https://xe29001.us-central1.gcp.snowflakecomputing.com:443-keepAlive from cache"}
{ stillRunning: false }
{"level":"TRACE","message":"[1:56:11.307 PM]: Get agent with id: https://xe29001.us-central1.gcp.snowflakecomputing.com:443-keepAlive from cache"}
isAnError? true
{ status: 'FAILED_WITH_ERROR' }
01b0b2c4-0001-8bfe-0049-210183aea08b

@TimShilov TimShilov added the bug Something isn't working label Dec 1, 2023
@github-actions github-actions bot changed the title connection.getQueryStatusThrowIfError() is not throwing an error SNOW-982536: connection.getQueryStatusThrowIfError() is not throwing an error Dec 1, 2023
@sfc-gh-dszmolka sfc-gh-dszmolka added the status-triage Issue is under initial triage label Dec 1, 2023
@sfc-gh-dszmolka sfc-gh-dszmolka self-assigned this Dec 1, 2023
@sfc-gh-dszmolka
Copy link
Collaborator

hi and thank you for raising this issue and providing such a detailed description, appreciated! we're going to take a look

@sfc-gh-dszmolka sfc-gh-dszmolka added status-in_progress Issue is worked on by the driver team and removed status-triage Issue is under initial triage labels Dec 4, 2023
@sfc-gh-dszmolka
Copy link
Collaborator

possible fix #722 , under review

@sfc-gh-dszmolka sfc-gh-dszmolka added status-pr_pending_merge A PR is made and is under review and removed status-in_progress Issue is worked on by the driver team labels Dec 27, 2023
@sfc-gh-dszmolka
Copy link
Collaborator

#746

@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 Jan 30, 2024
@sfc-gh-dszmolka
Copy link
Collaborator

PR is merged and will be part of the February release, coming in the second half of February

@sfc-gh-dszmolka
Copy link
Collaborator

fix released with snowflake-sdk 1.10.0, closing this issue

@Lumengrid
Copy link

we are using the 1.11.0 and types 1.6.24
but the asyncExec parameter is missing
we are using nodejs \ typescript

@sfc-gh-dszmolka
Copy link
Collaborator

hi - the external types you're using (v1.6.24) is not maintained by Snowflake
however, sadly it is indeed missing in the internal types (too); but it will be fixed with #851

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.
Projects
None yet
Development

No branches or pull requests

4 participants