Skip to content

feat(query-runner): storage config + websocket notifications#27542

Open
Khairajani wants to merge 22 commits intomainfrom
query_runner_socket_flow
Open

feat(query-runner): storage config + websocket notifications#27542
Khairajani wants to merge 22 commits intomainfrom
query_runner_socket_flow

Conversation

@Khairajani
Copy link
Copy Markdown
Contributor

@Khairajani Khairajani commented Apr 20, 2026

Summary

Adds the OSS-side pieces that let the Collate Query Runner stream results to object storage and notify the UI via websocket when a query completes. All Collate-specific logic lives in open-metadata/openmetadata-collate#query_runner_socket_flow; this PR only lands the schema/infrastructure pieces that must live in OSS.

  • queryRunnerRequest.json: runtime-injected storageConfig (bucket + prefix, no credentials) and resultPath. Worker fetches credentials via a separate callback so secret: refs resolve in-worker via CustomSecretStr.
  • queryRunnerResponse.json: resultPath for S3-backed results (mutually exclusive with inline results).
  • WebSocketManager: new queryRunnerChannel constant.
  • WebsocketNotificationHandler + new QueryRunnerMessage: COMPLETED / FAILED notifications for the UI hook.
  • SOCKET_EVENTS.QUERY_RUNNER_CHANNEL: TS constant so the UI hook can subscribe.
  • Regenerated TS from the two schema changes (picked up by the type-generation CI).

Test plan

  • Type-generation workflow stays green (no drift).
  • Collate PR query_runner_socket_flow builds against this branch end-to-end (test-connection + real BigQuery query verified locally — S3 streaming, WebSocket → UI fetch).

🤖 Generated with Claude Code


Summary by Gitar

  • Dependencies:
    • Updated sqlalchemy-pytds to ~=1.0 in ingestion/setup.py to fix cursor fetch issues with python-tds 1.x.
  • UI Constants:
    • Added configuration constants KNOWLEDGE_CENTER_CLASSIFICATION, CREATE_PAGE_HASH, and delay values in constants.ts.
    • Defined new routing paths for KNOWLEDGE_CENTER and associated sub-pages in constants.ts.

This will update automatically on new commits.

Adds schema + infrastructure for the Collate Query Runner to stream results
to object storage and notify the UI via websocket when a query completes.

- queryRunnerRequest: runtime-injected storageConfig {bucketName, prefix}
  and resultPath. Credentials never enter the payload — the worker fetches
  them via a server callback so secret: refs resolve in-worker via
  CustomSecretStr.
- queryRunnerResponse: resultPath for S3-backed results (mutually exclusive
  with inline results).
- WebSocketManager: queryRunnerChannel constant.
- WebsocketNotificationHandler + QueryRunnerMessage: COMPLETED/FAILED
  notifications for the UI hook.
- SOCKET_EVENTS.QUERY_RUNNER_CHANNEL so the UI hook can subscribe.

Paired with open-metadata/openmetadata-collate query_runner_socket_flow.
@Khairajani Khairajani requested a review from a team as a code owner April 20, 2026 09:39
@github-actions
Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@Khairajani Khairajani added Ready for testing Tickets that are fixed and ready for testing before closing them safe to test Add this label to run secure Github workflows on PRs and removed Ready for testing Tickets that are fixed and ready for testing before closing them labels Apr 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

The Java checkstyle failed.

Please run mvn spotless:apply in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@github-actions
Copy link
Copy Markdown
Contributor

✅ TypeScript Types Auto-Updated

The generated TypeScript types have been automatically updated based on JSON schema changes in this PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 20, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 62%
62.32% (64260/103103) 42.92% (34848/81177) 45.73% (10256/22427)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 20, 2026

🔴 Playwright Results — 2 failure(s), 12 flaky

✅ 4014 passed · ❌ 2 failed · 🟡 12 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 298 0 1 4
🟡 Shard 2 751 0 4 8
🔴 Shard 3 754 2 3 7
🟡 Shard 4 788 0 2 18
✅ Shard 5 687 0 0 41
🟡 Shard 6 736 0 2 8

Genuine Failures (failed on all attempts)

Features/Tasks/TaskNavigation.spec.ts › clicking task notification while on entity task tab refreshes the task list (shard 3)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeVisible�[2m(�[22m�[2m)�[22m failed

Locator: locator('.notification-box').locator('li.ant-list-item.notification-dropdown-list-btn').first()
Expected: visible
Timeout: 15000ms
Error: element(s) not found

Call log:
�[2m  - Expect "toBeVisible" with timeout 15000ms�[22m
�[2m  - waiting for locator('.notification-box').locator('li.ant-list-item.notification-dropdown-list-btn').first()�[22m

Features/Tasks/TaskNavigation.spec.ts › two sessions: admin on Columns tab creates task, assignee sees refresh on notification click (shard 3)
Error: �[2mexpect(�[22m�[31mlocator�[39m�[2m).�[22mtoBeVisible�[2m(�[22m�[2m)�[22m failed

Locator: locator('.notification-box').locator('li.ant-list-item.notification-dropdown-list-btn').first()
Expected: visible
Timeout: 15000ms
Error: element(s) not found

Call log:
�[2m  - Expect "toBeVisible" with timeout 15000ms�[22m
�[2m  - waiting for locator('.notification-box').locator('li.ant-list-item.notification-dropdown-list-btn').first()�[22m

🟡 12 flaky test(s) (passed on retry)
  • Features/Pagination.spec.ts › should test Directories normal pagination (shard 1, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event shows the actor who made the change (shard 2, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/CustomMetric.spec.ts › Table custom metric (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should start term as Draft when glossary has reviewers (shard 2, 2 retries)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/Table.spec.ts › Table pagination with sorting should works (shard 3, 1 retry)
  • Flow/NotificationAlerts.spec.ts › destination should work properly (shard 3, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate Description Rule Is_Not_Set (shard 4, 1 retry)
  • Pages/Domains.spec.ts › Domain Rbac (shard 4, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/TestSuite.spec.ts › Logical TestSuite (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@github-actions
Copy link
Copy Markdown
Contributor

The Java checkstyle failed.

Please run mvn spotless:apply in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Java code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 9, 2026

Code Review 👍 Approved with suggestions 0 resolved / 1 findings

Implements storage configuration and WebSocket notification infrastructure for query runner results while bumping sqlalchemy-pytds. Remove the duplicate route definition for 'KNOWLEDGE_CENTER_PAGE' and 'KNOWLEDGE_CENTER' in constants.ts.

💡 Quality: Duplicate route: KNOWLEDGE_CENTER_PAGE and KNOWLEDGE_CENTER

📄 openmetadata-ui/src/main/resources/ui/src/constants/constants.ts:156-157

Line 156 (KNOWLEDGE_CENTER_PAGE) and line 157 (KNOWLEDGE_CENTER) both resolve to the identical path '/knowledge-center'. This creates confusion about which key consumers should use and will likely lead to inconsistent usage across the codebase. Consider removing one and aliasing or renaming to a single canonical key.

🤖 Prompt for agents
Code Review: Implements storage configuration and WebSocket notification infrastructure for query runner results while bumping sqlalchemy-pytds. Remove the duplicate route definition for 'KNOWLEDGE_CENTER_PAGE' and 'KNOWLEDGE_CENTER' in constants.ts.

1. 💡 Quality: Duplicate route: KNOWLEDGE_CENTER_PAGE and KNOWLEDGE_CENTER
   Files: openmetadata-ui/src/main/resources/ui/src/constants/constants.ts:156-157

   Line 156 (`KNOWLEDGE_CENTER_PAGE`) and line 157 (`KNOWLEDGE_CENTER`) both resolve to the identical path `'/knowledge-center'`. This creates confusion about which key consumers should use and will likely lead to inconsistent usage across the codebase. Consider removing one and aliasing or renaming to a single canonical key.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 9, 2026

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 9, 2026

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

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant