Skip to content

feat(client-core): Use throwContinueWait parameter in cubeSql method#10461

Open
MazterQyou wants to merge 1 commit intomasterfrom
client/cubesql-throw-continue-wait
Open

feat(client-core): Use throwContinueWait parameter in cubeSql method#10461
MazterQyou wants to merge 1 commit intomasterfrom
client/cubesql-throw-continue-wait

Conversation

@MazterQyou
Copy link
Member

Check List

  • Tests have been run in packages where changes have been made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Description of Changes Made

This PR updates cubeSql method in cubejs-client-core to make use of the new throwContinueWait parameter.

Signed-off-by: Alex Qyoun-ae <4062971+MazterQyou@users.noreply.github.com>
@MazterQyou MazterQyou requested a review from a team as a code owner March 5, 2026 09:15
@github-actions github-actions bot added client:core Issues relating to the JavaScript client SDK javascript Pull requests that update Javascript code labels Mar 5, 2026
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 57.65%. Comparing base (3687c5f) to head (af5cabb).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
packages/cubejs-client-core/src/index.ts 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (3687c5f) and HEAD (af5cabb). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (3687c5f) HEAD (af5cabb)
cubesql 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #10461       +/-   ##
===========================================
- Coverage   78.51%   57.65%   -20.87%     
===========================================
  Files         472      222      -250     
  Lines       92294    17397    -74897     
  Branches     3563     3563               
===========================================
- Hits        72469    10030    -62439     
+ Misses      19287     6829    -12458     
  Partials      538      538               
Flag Coverage Δ
cube-backend 57.65% <0.00%> (ø)
cubesql ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

signal: options?.signal,
fetchTimeout: options?.timeout,
baseRequestId: options?.baseRequestId,
throwContinueWait: true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this, it's a breaking change, right? I believe we've agreed to let users configure this parameter by passing an explicit option, and then we'll make it true by default on the API side in the next minor. So, I believe we need to take throwContinueWait from options here—and in the React client library as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a breaking change since this is a parameter passed by the client and client is designed to handle continue wait as it does with load (the same method is used behind the scenes).

}

if (body.error === 'Continue wait') {
if (body.error?.includes('Continue wait')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not do that, because potential it can be a part of error message that are not continue wait.

Copy link
Member Author

@MazterQyou MazterQyou Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason for this change is that we throw this Continue wait from backend-native as CubeError::internal which leads to the error having extra prefixes like External error:. I'm open to suggestions fixing the prefixes here but backend-native itself uses the same .contains method for testing continue wait so I felt like this brings them in line.

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

Labels

client:core Issues relating to the JavaScript client SDK javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants