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

fix(server-core): Handle empty query in getSqlGenerator #9270

Merged
merged 2 commits into from
Feb 26, 2025

Conversation

mcheshkov
Copy link
Member

Check List

  • Tests have been run in packages where changes 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 (if issue reference is not provided)

api-gateway calls getSqlGenerator with empty query and concrete data source to initialize SQL API But because query is empty sqlGenerator.dataSource can be undefined, and it would trigger re-creating query with new data source, which would be default

@mcheshkov mcheshkov force-pushed the sql-api-nondefault-datasouce-confusion branch from a03d9dd to cf0379e Compare February 26, 2025 00:14
@mcheshkov mcheshkov force-pushed the sql-api-nondefault-datasouce-confusion branch from cf0379e to 9942770 Compare February 26, 2025 09:58
@mcheshkov mcheshkov changed the title [WIP add test] fix(server-core): Handle empty query in getSqlGenerator fix(server-core): Handle empty query in getSqlGenerator Feb 26, 2025
@mcheshkov mcheshkov marked this pull request as ready for review February 26, 2025 09:59
@mcheshkov mcheshkov requested a review from a team as a code owner February 26, 2025 09:59
Copy link
Member

@KSDaemon KSDaemon left a comment

Choose a reason for hiding this comment

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

👍🏻 LGTM!

api-gateway calls getSqlGenerator with empty query and concrete data source to initialize SQL API
But because query is empty `sqlGenerator.dataSource` can be undefined, and it would trigger re-creating query with new data source, which would be `default`
@mcheshkov mcheshkov force-pushed the sql-api-nondefault-datasouce-confusion branch from 9942770 to cb81b2e Compare February 26, 2025 13:05
@mcheshkov mcheshkov merged commit 350a438 into master Feb 26, 2025
53 checks passed
@mcheshkov mcheshkov deleted the sql-api-nondefault-datasouce-confusion branch February 26, 2025 13:39
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.

3 participants