Skip to content

YQ-4756 new streaming queries fields - #4472

Open
kardymonds wants to merge 3 commits into
ydb-platform:mainfrom
kardymonds:YQ-4756-new-streaming-queries-fields
Open

kardymonds wants to merge 3 commits into
ydb-platform:mainfrom
kardymonds:YQ-4756-new-streaming-queries-fields

Conversation

@kardymonds

@kardymonds kardymonds commented Oct 6, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5 Tier: plus

The PR appears safe to merge, with two non-blocking fixes worth making.

Fix All in CodexFindings

  1. P2 Numeric dates show as missing ▶
  2. P2 New lifecycle fields go untested ▶
Fix with agent prompt
### Issue 1
src/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.tsx:144-146
If a query returns a numeric `StartedAt`, `ModifiedAt`, or `FinishedAt`, `formatLifecycleValue` skips the date and the page shows `-`. The query parser keeps numbers unchanged. Parse numeric timestamps before using the fallback.

### Issue 2
tests/suites/tenant/diagnostics/tabs/info.test.ts:778-783
The updated test returns only `Status`, `Issues`, and `Text`. It never checks the new lifecycle rows or the created-date fallback, so a broken field name or date format can pass. Add a response and assertions for those fields.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

The streaming-query Overview now brings schema details and query lifecycle times together, alongside the query state, errors, and text. It reads the query row’s available fields so it can show lifecycle details when the backend provides them.

  • Streaming-query pages show lifecycle details alongside schema info.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  D["Describe response"] --> S["SchemaObjectInfo"]
  Q["Streaming query result"] --> L["Lifecycle fields"]
  Q --> E["State, issues, and text"]
  L --> S
Loading

Reviews (1) · Last reviewed commit: "added seconds"

Copilot AI balanced review requested due to automatic review settings October 6, 2026 21:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Visual snapshots are stale, and the new lifecycle behavior lacks focused coverage.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

Adds lifecycle metadata and schema details to streaming-query diagnostics while preserving older backend compatibility.

Changes:

  • Displays creation, modification, start, and stop metadata.
  • Fetches optional lifecycle columns while excluding large plan fields.
  • Integrates common schema-object information.
File Description
tests/​suites/​tenant/​diagnostics/​tabs/​info.test.ts Updates mocked query column names.
src/​store/​reducers/​streamingQuery/​streamingQuery.ts Retrieves available streaming-query fields.
StreamingQueryInfo.tsx Renders lifecycle and schema metadata.
StreamingQueryInfo/​i18n/​en.json Adds lifecycle labels.
SchemaObjectInfo.tsx Accepts custom creation content.
prepareSchemaObjectInfo.tsx Uses custom creation metadata.
Overview.tsx Integrates streaming-query schema information.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +780 to +781
{name: 'Status', type: 'Utf8?'},
{name: 'Issues', type: 'Utf8?'},
Comment on lines +102 to +106
const lifecycleFields = [
{name: i18n('field_started'), timestamp: 'StartedAt', user: 'StartedBy'},
{name: i18n('field_modified'), timestamp: 'ModifiedAt', user: 'ModifiedBy'},
{name: i18n('field_stopped'), timestamp: 'FinishedAt', user: 'StoppedBy'},
];
@greptile-apps

greptile-apps Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

RetriggerTREX TREX

No flows tested, and faced 1 obstacle.

Obstacles faced

  • The local database has no streaming query; provide one with the required source and sink topics.

To reduce obstacles, configure your TREX environment.

Comment on lines +144 to +146
const milliseconds = typeof timestamp === 'string' ? Date.parse(timestamp) : NaN;
const dateMilliseconds =
Number.isFinite(milliseconds) && milliseconds > 0 ? milliseconds : Number(fallback);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Numeric dates show as missing

If a query returns a numeric StartedAt, ModifiedAt, or FinishedAt, formatLifecycleValue skips the date and the page shows —. The query parser keeps numbers unchanged. Parse numeric timestamps before using the fallback.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/containers/Tenant/Diagnostics/Overview/StreamingQueryInfo/StreamingQueryInfo.tsx
Line: 144-146

Comment:
**Numeric dates show as missing**

If a query returns a numeric `StartedAt`, `ModifiedAt`, or `FinishedAt`, `formatLifecycleValue` skips the date and the page shows `—`. The query parser keeps numbers unchanged. Parse numeric timestamps before using the fallback.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Codex Fix in Claude Code

Comment on lines 778 to 783
rows: [['RUNNING', '{}', 'SELECT 1;']],
columns: [
{name: 'State', type: 'Utf8?'},
{name: 'Error', type: 'Utf8?'},
{name: 'Status', type: 'Utf8?'},
{name: 'Issues', type: 'Utf8?'},
{name: 'Text', type: 'Utf8?'},
],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 New lifecycle fields go untested

The updated test returns only Status, Issues, and Text. It never checks the new lifecycle rows or the created-date fallback, so a broken field name or date format can pass. Add a response and assertions for those fields.

Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/suites/tenant/diagnostics/tabs/info.test.ts
Line: 778-783

Comment:
**New lifecycle fields go untested**

The updated test returns only `Status`, `Issues`, and `Text`. It never checks the new lifecycle rows or the created-date fallback, so a broken field name or date format can pass. Add a response and assertions for those fields.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Codex Fix in Claude Code

This branch has not been deployed

No deployments
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.

2 participants