Skip to content

Conversation

@astandrik
Copy link
Collaborator

@astandrik astandrik commented Dec 9, 2025

Closes #3134

Stand

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
384 380 0 2 2
Test Changes Summary ✨3 ⏭️2

✨ New Tests (3)

  1. Resource pool dropdown is populated from system view (tenant/queryEditor/querySettings.test.ts)
  2. Resource pool selection is persisted between dialog opens (tenant/queryEditor/querySettings.test.ts)
  3. Selected resource pool is sent in API requests and no override omits parameter (tenant/queryEditor/querySettings.test.ts)

⏭️ Skipped Tests (2)

  1. Scroll to row, get shareable link, navigate to URL and verify row is scrolled into view (tenant/diagnostics/tabs/queries.test.ts)
  2. Copy result button copies to clipboard (tenant/queryEditor/queryEditor.test.ts)

Bundle Size: 🔺

Current: 62.50 MB | Main: 62.48 MB
Diff: +0.01 MB (0.02%)

⚠️ Bundle size increased. Please review.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

8 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for specifying resource pools when launching queries in the YDB Embedded UI. Users can now select a resource pool from a dropdown in the query settings dialog, which will be applied to their query execution.

Key changes:

  • Added resource pool selection to query settings dialog with support for fetching available pools
  • Modified query execution to include resource_pool parameter in API requests
  • Added utility function for applying resource pool pragma to queries (though not currently used)

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/utils/query.ts Added RESOURCE_POOL_NO_OVERRIDE_VALUE constant and resourcePool field to query settings schema
src/types/api/query.ts Added resource_pool parameter to SendQueryParams interface
src/store/reducers/query/utils.ts Added applyResourcePoolPragma utility function to inject resource pool pragma into queries
src/store/reducers/query/query.ts Added getResourcePools endpoint to fetch available pools and integrated resource_pool parameter into query execution
src/store/reducers/query/test/prepareQueryWithPragmas.test.ts Added comprehensive tests for applyResourcePoolPragma function
src/containers/Tenant/Query/QuerySettingsDialog/i18n/ru.json Added Russian translations for resource pool UI
src/containers/Tenant/Query/QuerySettingsDialog/i18n/en.json Added English translations for resource pool UI
src/containers/Tenant/Query/QuerySettingsDialog/constants.ts Added field settings for resource pool selector
src/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsSelect.tsx Updated type to support string values for resource pool names
src/containers/Tenant/Query/QuerySettingsDialog/QuerySettingsDialog.tsx Added resource pool selector UI component with API integration

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Additional Comments (1)

  1. src/utils/query.ts, line 309-317 (link)

    logic: DEFAULT_QUERY_SETTINGS missing resourcePool field. Should include resourcePool: RESOURCE_POOL_NO_OVERRIDE_VALUE to ensure consistent initialization across the app.

6 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

src/utils/query.ts:317

  • The resourcePool field is missing from DEFAULT_QUERY_SETTINGS. Since this is a new optional field that can be undefined, it should have a default value specified in DEFAULT_QUERY_SETTINGS (e.g., resourcePool: undefined or resourcePool: RESOURCE_POOL_NO_OVERRIDE_VALUE). This ensures consistent initialization and makes the default behavior explicit.
export const DEFAULT_QUERY_SETTINGS = {
    queryMode: QUERY_MODES.query,
    transactionMode: TRANSACTION_MODES.implicit,
    timeout: null,
    limitRows: 10000,
    statisticsMode: STATISTICS_MODES.none,
    tracingLevel: TRACING_LEVELS.off,
    pragmas: defaultPragma,
};

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

8 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

src/utils/query.ts:317

  • The DEFAULT_QUERY_SETTINGS object should include a default value for resourcePool to ensure consistent initialization. Consider adding resourcePool: RESOURCE_POOL_NO_OVERRIDE_VALUE to the defaults. This would prevent undefined values when settings are restored or initialized for the first time, ensuring the "No pool override" option is selected by default.
export const DEFAULT_QUERY_SETTINGS = {
    queryMode: QUERY_MODES.query,
    transactionMode: TRANSACTION_MODES.implicit,
    timeout: null,
    limitRows: 10000,
    statisticsMode: STATISTICS_MODES.none,
    tracingLevel: TRACING_LEVELS.off,
    pragmas: defaultPragma,
};

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

11 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Collaborator Author

@astandrik astandrik left a comment

Choose a reason for hiding this comment

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

we should get resource pools on query editor opening

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

11 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@astandrik astandrik marked this pull request as draft December 9, 2025 23:00
@astandrik astandrik marked this pull request as ready for review December 10, 2025 07:51
@astandrik astandrik requested a review from Copilot December 10, 2025 07:51
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

14 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

14 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@astandrik
Copy link
Collaborator Author

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no bugs!


version: 8,
result: [
{
rows: [['default'], ['olap']],
Copy link
Member

Choose a reason for hiding this comment

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

Why not await setupResourcePoolMock(page, ['default', 'olap'])?

});
});

await page.route(`${backend}/viewer/query?*`, async (route: Route) => {
Copy link
Member

Choose a reason for hiding this comment

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

Why do you have this code twice?

await page.route(`${backend}/viewer/json/query?*`, async (route: Route) => {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

because streamQuery uses /viewer/query while sendQuery uses /viewer/json/query

@ydb-platform ydb-platform deleted a comment from greptile-apps bot Dec 11, 2025
@ydb-platform ydb-platform deleted a comment from greptile-apps bot Dec 11, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

14 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

13 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

14 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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.

Specify resource pools when launching a query

3 participants