Skip to content

fix: Cherry-pick DH-17599: Fix table name validation (#2403)#2404

Merged
vbabich merged 1 commit intodeephaven:release/v0.85from
vbabich:cherry_pick_table_name_validation
Apr 9, 2025
Merged

fix: Cherry-pick DH-17599: Fix table name validation (#2403)#2404
vbabich merged 1 commit intodeephaven:release/v0.85from
vbabich:cherry_pick_table_name_validation

Conversation

@vbabich
Copy link
Copy Markdown
Collaborator

@vbabich vbabich commented Apr 2, 2025

PR #2398 allowed hyphens in namespace and table names. However, I
noticed that server-side validation rejects names starting with a
hyphen, while these names appear valid on the client-side.

io.deephaven.db.tables.utils.DBNameValidator uses separate regular
expressions to sanitize and validate names. This change adds the correct
TABLE_NAME_PATTERN for table name validation instead of checking if
the name matches its sanitized version.


Co-authored-by: Copilot 175728472+Copilot@users.noreply.github.com

PR deephaven#2398 allowed hyphens in namespace and table names. However, I
noticed that server-side validation rejects names starting with a
hyphen, while these names appear valid on the client-side.

`io.deephaven.db.tables.utils.DBNameValidator` uses separate regular
expressions to sanitize and validate names. This change adds the correct
`TABLE_NAME_PATTERN` for table name validation instead of checking if
the name matches its sanitized version.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@vbabich vbabich self-assigned this Apr 2, 2025
@vbabich vbabich marked this pull request as ready for review April 2, 2025 21:16
@vbabich vbabich requested review from a team and bmingles and removed request for a team April 2, 2025 21:16
Comment thread packages/utils/src/DbNameValidator.test.ts
Copy link
Copy Markdown
Contributor

@bmingles bmingles left a comment

Choose a reason for hiding this comment

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

Left one question

@vbabich vbabich requested a review from bmingles April 9, 2025 14:49
Copy link
Copy Markdown
Contributor

@bmingles bmingles left a comment

Choose a reason for hiding this comment

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

LGTM

@vbabich vbabich merged commit 2055bc9 into deephaven:release/v0.85 Apr 9, 2025
10 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants