Skip to content

feat(Queries): always show spyt engine [YTFRONT-5528]#1431

Draft
SimbiozizV wants to merge 1 commit intomainfrom
YTFRONT-5528
Draft

feat(Queries): always show spyt engine [YTFRONT-5528]#1431
SimbiozizV wants to merge 1 commit intomainfrom
YTFRONT-5528

Conversation

@SimbiozizV
Copy link
Collaborator

@SimbiozizV SimbiozizV commented Feb 2, 2026

https://nda.ya.ru/t/NUxfx9f57TSxzG

## Summary by Sourcery

Update cluster engine support detection to always expose the SPYT engine while allowing UI-specific overrides per cluster.

New Features:

  • Introduce UIFactory hook to override supported query engines per cluster configuration.

Enhancements:

  • Refine cluster supported engines selector to treat SPYT as always available by default and accept override configuration from UIFactory.

@sourcery-ai
Copy link

sourcery-ai bot commented Feb 2, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Exposes the SPYT query engine for all clusters by default and adds a UIFactory extension point to override supported engines per cluster UI configuration.

Class diagram for updated UIFactory interface with cluster engine overrides

classDiagram
    class UIFactory {
        +getClusterAppearance(cluster: string) ClusterAppearance
        +getClusterSupportedEnginesOverrides(clusterUiConfig: ClusterUiConfig) PartialQueryEngineSupport
        +isWatchMen(login: string) boolean
        +makeUrlForTransferTask(operation: unknown) string
    }

    class ClusterUiConfig
    class ClusterAppearance

    class QueryEngine {
        <<enumeration>>
        yql
        chyt
        spyt
        ql
    }

    class PartialQueryEngineSupport {
        <<type>>
        [QueryEngine]: boolean
    }

    UIFactory --> ClusterUiConfig : uses
    UIFactory --> ClusterAppearance : returns
    UIFactory --> PartialQueryEngineSupport : returns
    PartialQueryEngineSupport --> QueryEngine : indexedBy
Loading

File-Level Changes

Change Details Files
Expose SPYT query engine by default and allow UIFactory-based per-cluster engine overrides in the cluster supported engines selector.
  • Refactor cluster supported engines selector to use the full clusterUiConfig object instead of destructuring livy controller URL
  • Always enable SPYT in the supported engines map instead of depending on livy controller configuration
  • Add support for UIFactory.getClusterSupportedEnginesOverrides hook and merge its result into the supported engines map
packages/ui/src/ui/store/selectors/global/cluster.ts
Extend UIFactory interface with an optional hook for overriding cluster-supported query engines.
  • Import the QueryEngine type into UIFactory module for typing engine overrides
  • Add optional getClusterSupportedEnginesOverrides method to UIFactory interface that accepts ClusterUiConfig and returns a partial engine support map
packages/ui/src/ui/UIFactory/index.tsx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

Storybook is ready.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

Playwright components report is ready.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

Statoscope report is ready.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

E2E-local report is ready.
E2E-remote report is ready.
E2E-screenshots report is ready.
E2E-passwd report is ready.

@SimbiozizV SimbiozizV marked this pull request as ready for review February 2, 2026 13:37
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • In getClusterSupportedEngines, clusterUiConfig is passed directly to UIFactory.getClusterSupportedEnginesOverrides but is typed as ClusterUiConfig; if state.global.clusterUiConfig can be undefined at any point, consider tightening the state typing or adding a guard to avoid passing an invalid value to the UIFactory hook.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In `getClusterSupportedEngines`, `clusterUiConfig` is passed directly to `UIFactory.getClusterSupportedEnginesOverrides` but is typed as `ClusterUiConfig`; if `state.global.clusterUiConfig` can be undefined at any point, consider tightening the state typing or adding a guard to avoid passing an invalid value to the UIFactory hook.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@SimbiozizV SimbiozizV marked this pull request as draft February 9, 2026 11:49
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.

1 participant