Skip to content

fix(inkless:metadata): accept pipe as a client.id AZ separator [KC-443] - #767

Merged
EelisK merged 1 commit into
mainfrom
jeqo/client-az-extractor-mm
Aug 21, 2026
Merged

EelisK merged 1 commit into
mainfrom
jeqo/client-az-extractor-mm

Conversation

@jeqo

@jeqo jeqo commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

MirrorMaker 2 appends |<source>-><target>|<connector>|<role> to any configured client.id via MirrorConnectorConfig.addClientId(). With the old regex, that suffix was swallowed into the diskless_az capture, so a client.id of diskless_az=euc1-az2 arrived as
diskless_az=euc1-az2|primary->backup|MirrorSourceConnector|producer and AZ extraction returned null after failing every hyphen-truncation candidate.

Treat | as both a valid leading separator and an AZ stop character so MM2's pipe-appended client.id parses the same as the comma-separated form Connect produces. This is symmetric with the existing comma handling and removes the fragility for any client that suffixes client.id with a pipe.

@jeqo
jeqo force-pushed the jeqo/client-az-extractor-mm branch from 6872cf0 to 89b3256 Compare August 21, 2026 09:24
@jeqo
jeqo marked this pull request as ready for review August 21, 2026 09:56
@jeqo
jeqo requested a balanced review from Copilot August 21, 2026 09:56

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

Extends client AZ extraction to support MirrorMaker 2 pipe-delimited client ID suffixes.

Changes:

  • Treats | as an AZ separator and terminator.
  • Adds pipe-delimited extraction and validation tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
ClientAZExtractor.java Updates the extraction regex.
ClientAZExtractorTest.java Covers pipe-delimited client IDs.

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

@jeqo
jeqo requested a review from EelisK August 21, 2026 10:09

@EelisK EelisK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good catch 👍

Comment on lines +26 to +28
// '|' is a separator and a stop character because MirrorMaker 2's
// MirrorConnectorConfig.addClientId appends |<source>-><target>|<connector>|<role>
// to any configured client.id; without it that suffix is swallowed into the AZ capture.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: this is a 3-line comment explaining a single character in a regex. Consider removing it or making it more concise.

Suggested change
// '|' is a separator and a stop character because MirrorMaker 2's
// MirrorConnectorConfig.addClientId appends |<source>-><target>|<connector>|<role>
// to any configured client.id; without it that suffix is swallowed into the AZ capture.
// MM2's MirrorConnectorConfig.addClientId appends |<source>-><target>|<connector>|<role> to client.id

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fair point. Moving the detailed format to doc and kept a simpler doc line here.

@jeqo
jeqo force-pushed the jeqo/client-az-extractor-mm branch from 89b3256 to 381d99f Compare August 21, 2026 10:55
MirrorMaker 2 appends |<source>-><target>|<connector>|<role> to any
configured client.id via MirrorConnectorConfig.addClientId(). With the
old regex, that suffix was swallowed into the diskless_az capture, so a
client.id of diskless_az=euc1-az2 arrived as
diskless_az=euc1-az2|primary->backup|MirrorSourceConnector|producer and
AZ extraction returned null after failing every hyphen-truncation
candidate.

Treat | as both a valid leading separator and an AZ stop character so
MM2's pipe-appended client.id parses the same as the comma-separated
form Connect produces. This is symmetric with the existing comma
handling and removes the fragility for any client that suffixes
client.id with a pipe.
@jeqo
jeqo force-pushed the jeqo/client-az-extractor-mm branch from 381d99f to 19091ea Compare August 21, 2026 10:58
@EelisK
EelisK merged commit 1c39908 into main Aug 21, 2026
6 checks passed
@EelisK
EelisK deleted the jeqo/client-az-extractor-mm branch August 21, 2026 11:38
jeqo added a commit that referenced this pull request Sep 9, 2026
MirrorMaker 2 appends |<source>-><target>|<connector>|<role> to any
configured client.id via MirrorConnectorConfig.addClientId(). With the
old regex, that suffix was swallowed into the diskless_az capture, so a
client.id of diskless_az=euc1-az2 arrived as
diskless_az=euc1-az2|primary->backup|MirrorSourceConnector|producer and
AZ extraction returned null after failing every hyphen-truncation
candidate.

Treat | as both a valid leading separator and an AZ stop character so
MM2's pipe-appended client.id parses the same as the comma-separated
form Connect produces. This is symmetric with the existing comma
handling and removes the fragility for any client that suffixes
client.id with a pipe.
jeqo added a commit that referenced this pull request Sep 9, 2026
MirrorMaker 2 appends |<source>-><target>|<connector>|<role> to any
configured client.id via MirrorConnectorConfig.addClientId(). With the
old regex, that suffix was swallowed into the diskless_az capture, so a
client.id of diskless_az=euc1-az2 arrived as
diskless_az=euc1-az2|primary->backup|MirrorSourceConnector|producer and
AZ extraction returned null after failing every hyphen-truncation
candidate.

Treat | as both a valid leading separator and an AZ stop character so
MM2's pipe-appended client.id parses the same as the comma-separated
form Connect produces. This is symmetric with the existing comma
handling and removes the fragility for any client that suffixes
client.id with a pipe.
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.

3 participants