Allow commas in namespace names - #3111
Open
kalra-mohit wants to merge 1 commit into
Open
Conversation
|
Thanks for opening your first pull request in the Marquez project! Please check out our contributing guidelines (https://github.com/MarquezProject/marquez/blob/main/CONTRIBUTING.md). |
NamespaceName's validation regex disallowed commas, even though commas are commonly present in real-world namespace values (e.g. JDBC/ODBC connection strings with comma-separated options, such as SQL Server connection strings using multiple properties). No other part of the codebase uses commas as a delimiter for namespace values (NodeId uses ':' and '#'; there is no comma-separated namespace query param), so there is no delimiter conflict from allowing them. Adds ',' to the allowed character set in NamespaceName.PATTERN and updates the validation error message to mention commas. Adds regression test cases in NamespaceNameTest covering a bare comma, a namespace containing a comma, and a realistic connection string containing commas - all of which threw IllegalArgumentException before this change. Fixes MarquezProject#3110 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Mohit Kalra <mohit2494@gmail.com>
kalra-mohit
force-pushed
the
fix/3110-allow-commas-in-namespace-names
branch
from
July 22, 2026 01:16
cec344f to
34ce4fc
Compare
kalra-mohit
marked this pull request as ready for review
July 22, 2026 02:30
Author
|
@merobi-hub whenever you get a chance to take a look, happy to address any feedback! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Namespace values that contain a comma get rejected with
IllegalArgumentException. Showed up in practice with SQL Server/JDBC connection-string style namespaces, which use commas to separate options — e.g.sqlserver://host;databaseName=DB1,DB2.Root cause is boring:
NamespaceName's validation regex just never allowed,in the character class:Before adding it I checked whether
,is used as a delimiter anywhere that a newly-permitted comma could break something — namespace lists in query params,NodeId-style token splitting, that sort of thing.NodeIdonly parses on:and#, and there's no comma-delimited namespace query param anywhere, so there's nothing for this to collide with.flowchart TD In["Namespace value containing a comma e.g. sqlserver://host;databaseName=DB1,DB2"] In --> Old["Old PATTERN: comma not in allowed char class"] Old --> OldOut["No match -> IllegalArgumentException"] In --> New["New PATTERN: comma added to allowed char class"] New --> NewOut["Match -> NamespaceName created"]Fix: added
,toNamespaceName.PATTERNand updated the validation error message to mention commas as an allowed character.Testing: added three regression cases to
NamespaceNameTest#testValidNamespaceName— a comma-containing name, a bare,, and a realistic SQL Server connection-string namespace. Confirmed all three throw before the fix and pass after:3 failures before the fix, 15/15 passing after.
Fixes #3110.