Skip to content

Conversation

@peter-leonov-ch
Copy link
Collaborator

@peter-leonov-ch peter-leonov-ch commented Jan 26, 2026

Summary

A few weeks ago the cloud integration tests started failing. I'm guessing this is because of the gradual rollout of the new exception handling mechanism.

This PR makes some changes that fix the tests.

@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/client-node/src/result_set.ts 50.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

const value = row.json()
if (isException(value)) {
throw parseError(value.exception)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure how did the tests work before this @slvrtrn, likely I'm fixing the symptom not the root case here.

Copy link
Contributor

Choose a reason for hiding this comment

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

depends on the version of ClickHouse you are testing with
this should work after 25.11: https://github.com/ClickHouse/clickhouse-js/pull/535/changes#diff-e515192c535cccfaf415f4ff430d266ec9fdfef2d6262aa96af3fdb312543310R170-R177
cause json still calls stream under the hood

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, this is clear, thanks. Do you think the isException() is appropriate here?

I'm thinking of creating a compatibility matrix that will allow to know ahead of time from the config options and CH version if this isException() is really required for each row. WDYT?

Copy link
Collaborator Author

@peter-leonov-ch peter-leonov-ch Jan 26, 2026

Choose a reason for hiding this comment

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

Also, the tests broke without the JS client changing code, it seems like the updated CH version might have changed something on the server side thus the explicit config option.

Copy link
Member

Choose a reason for hiding this comment

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

it seems like the updated CH version might have changed something on the server side thus the explicit config option.

What version do we test against? Why don't we see such problem against HEAD or latest?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good question. If you folks don't know from the top of your heads, I'll dive deeper into what caused the degradation.

@peter-leonov-ch peter-leonov-ch marked this pull request as ready for review January 26, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants