Skip to content

fix: add disable ttl table action - #3938

Merged
Raubzeug merged 3 commits into
mainfrom
fix-disable-ttl-action
May 25, 2026
Merged

Raubzeug merged 3 commits into
mainfrom
fix-disable-ttl-action

Conversation

@antonkovalenko

@antonkovalenko antonkovalenko commented May 24, 2026 •

Copy link
Copy Markdown
Member

What changed

  • Renamed the TTL-enabling schema action to Enable TTL... and removed the incorrect zero-interval disable hint from that template.
  • Added a separate row-table Disable TTL... action that inserts ALTER TABLE <table> RESET (TTL); with a docs link.
  • Kept column tables on the enable-TTL template only.
  • Added focused unit coverage for the enable and disable TTL templates.

Closes #3937.

Validation

  • npm run typecheck
  • npm run lint (passes with existing warnings)
  • npm test -- --runInBand

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
678 672 0 3 3

😟 No changes in tests. 😕

Bundle Size: ✅

Current: 63.96 MB | Main: 63.96 MB
Diff: +1.24 KB (0.00%)

✅ Bundle size unchanged.

ℹ️ 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.

@antonkovalenko
antonkovalenko marked this pull request as ready for review May 25, 2026 05:45
@antonkovalenko
antonkovalenko requested a review from astandrik as a code owner May 25, 2026 05:45
Copilot AI review requested due to automatic review settings May 25, 2026 05:45

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.

Pull request overview

This PR updates the schema-tree “Alter table” query templates/actions to correctly separate enabling TTL from disabling TTL for row tables, aligning the UI templates with YDB’s actual TTL disable syntax and the linked issue (#3937).

Changes:

  • Renamed the previous TTL action/template to an explicit “Enable TTL…” template and removed the incorrect “disable via zero interval” hint.
  • Added a dedicated “Disable TTL…” action for row tables that inserts ALTER TABLE <table> RESET (TTL); with a documentation link.
  • Added unit tests covering both the enable and disable TTL templates.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/containers/Tenant/utils/schemaQueryTemplates.ts Splits TTL templates into enable vs disable (RESET) variants and removes the incorrect disable hint.
src/containers/Tenant/utils/schemaActions.tsx Wires the new “Enable TTL…” action and limits “Disable TTL…” to row tables as intended.
src/containers/Tenant/utils/test/schemaQueryTemplates.test.ts Adds focused unit tests for the updated TTL templates.
src/containers/Tenant/i18n/en.json Introduces the new “Enable TTL…” label and renames the existing TTL label to “Disable TTL…”.

Comment thread src/containers/Tenant/utils/schemaQueryTemplates.ts Outdated
Comment thread src/containers/Tenant/i18n/en.json Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6bc2e0c480

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 368 to +370
const alterColumnTableGroupItem = {
text: i18n('actions.alterTable'),
items: [manageColumnsItem, manageAutoPartitioningItem, manageTTLItem],
items: [manageColumnsItem, manageAutoPartitioningItem, enableTTLItem],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include disable TTL entry in column table actions

The column-table Alter table menu now only exposes enableTTLItem, while the new disable template (manageTTLTemplate) is not reachable there. This means users working with column-oriented tables can no longer disable TTL from the built-in schema actions (the previous manageTTL action was removed from this group), which is a functional regression in the UI workflow for existing TTL-enabled column tables.

Useful? React with 👍 / 👎.

@Raubzeug

Copy link
Copy Markdown
Contributor

@copilot address review comments

Copilot AI commented May 25, 2026

Copy link
Copy Markdown
Contributor

@copilot address review comments

Done in 60b21e7:

  • Removed ?version=main from the docs URL in manageTTLTemplate so it follows the same pattern as every other link in the file.
  • Renamed i18n key actions.manageTTL → actions.disableTTL in en.json and updated both reference sites in schemaActions.tsx.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 60b21e71d5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

const alterColumnTableGroupItem = {
text: i18n('actions.alterTable'),
items: [manageColumnsItem, manageAutoPartitioningItem, manageTTLItem],
items: [manageColumnsItem, manageAutoPartitioningItem, enableTTLItem],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep disable TTL action for column tables

Removing manageTTLItem from the column-table Alter table menu creates a regression for TTL-enabled column tables: users can still enable TTL via enableTTLItem, but they no longer have a built-in action to generate the corresponding ALTER TABLE ... RESET (TTL) query and must craft it manually. Since this commit introduces a dedicated disable template and row tables still expose it, column tables should expose the same disable action to preserve the previous workflow.

Useful? React with 👍 / 👎.

@Raubzeug

Copy link
Copy Markdown
Contributor

@copilot check naming! for now it's not manage, its disable. Fix all vars and test names.

Copilot AI commented May 25, 2026

Copy link
Copy Markdown
Contributor

@copilot check naming! for now it's not manage, its disable. Fix all vars and test names.

Done in f83df1f. All manage TTL identifiers are now disable:

  • manageTTLTemplate → disableTTLTemplate (export, import, and call sites)
  • manageTTL action key → disableTTL
  • manageTTLItem → disableTTLItem
  • Test describe('manageTTLTemplate', ...) → describe('disableTTLTemplate', ...)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f83df1fc33

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

const alterColumnTableGroupItem = {
text: i18n('actions.alterTable'),
items: [manageColumnsItem, manageAutoPartitioningItem, manageTTLItem],
items: [manageColumnsItem, manageAutoPartitioningItem, enableTTLItem],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add disable TTL action to column table alter menu

Column-table actions now omit disableTTLItem, so users with TTL-enabled column tables no longer have a built-in way to generate ALTER TABLE ... RESET (TTL) from the UI. This commit also removed the old zero-interval disable hint from the enable template, so the previous in-menu disable path is gone entirely for column tables while row tables still have it, creating a functional regression in the column-table workflow.

Useful? React with 👍 / 👎.

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 add disable action here

const alterColumnTableGroupItem = {
text: i18n('actions.alterTable'),
items: [manageColumnsItem, manageAutoPartitioningItem, manageTTLItem],
items: [manageColumnsItem, manageAutoPartitioningItem, enableTTLItem, disableTTLItem],

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.

P1 disableTTLItem added to column table menu, contradicting the PR description

The PR description explicitly states "Kept column tables on the enable-TTL template only," but disableTTLItem is included in alterColumnTableGroupItem here. If ALTER TABLE … RESET (TTL) is not supported for column tables in YDB, surfacing this action would let users run a query that will always fail. The row-table group correctly lists both items — the column-table group should likely include only enableTTLItem.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/containers/Tenant/utils/schemaActions.tsx
Line: 370

Comment:
**`disableTTLItem` added to column table menu, contradicting the PR description**

The PR description explicitly states "Kept column tables on the enable-TTL template only," but `disableTTLItem` is included in `alterColumnTableGroupItem` here. If `ALTER TABLE … RESET (TTL)` is not supported for column tables in YDB, surfacing this action would let users run a query that will always fail. The row-table group correctly lists both items — the column-table group should likely include only `enableTTLItem`.

How can I resolve this? If you propose a fix, please make it concise.

Fix in Codex Fix in Claude Code

@Raubzeug
Raubzeug force-pushed the fix-disable-ttl-action branch from 9b53f85 to f83df1f Compare May 25, 2026 08:44

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f83df1fc33

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/containers/Tenant/utils/schemaActions.tsx
@Raubzeug
Raubzeug added this pull request to the merge queue May 25, 2026
Merged via the queue into main with commit cb8a1cf May 25, 2026
34 checks passed
@Raubzeug
Raubzeug deleted the fix-disable-ttl-action branch May 25, 2026 08:59
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.

Improve alter table/manage ttl template and add a proper option to disable TTL

4 participants