[FLINK-40208][runtime] Add test coverage and blank-key validation for JobMdcRegistry - #28917
Open
Izeren wants to merge 1 commit into
Open
[FLINK-40208][runtime] Add test coverage and blank-key validation for JobMdcRegistry#28917Izeren wants to merge 1 commit into
Izeren wants to merge 1 commit into
Conversation
Izeren
marked this pull request as ready for review
August 4, 2026 09:32
1 task
Contributor
Author
|
@rkhachatryan, I have added more tests and minor improvements as a follow-up, PTAL when you have time. |
Collaborator
Izeren
force-pushed
the
FLINK-40208/test-coverage-followup
branch
from
August 5, 2026 08:15
70e23e2 to
41e926d
Compare
…gistry Generated-by: Claude Code
Izeren
force-pushed
the
FLINK-40208/test-coverage-followup
branch
from
August 6, 2026 12:35
41e926d to
95cec7e
Compare
rkhachatryan
reviewed
Aug 6, 2026
Comment on lines
+182
to
+188
| if (mdcKeyName == null || mdcKeyName.isBlank()) { | ||
| if (WARNED_BLANK_MDC_KEYS.add(entry.getKey())) { | ||
| LOG.warn( | ||
| "MDC key name for configuration key '{}' is blank; skipping.", | ||
| entry.getKey()); | ||
| } | ||
| continue; |
Contributor
There was a problem hiding this comment.
TBH this solutions seems a bit too complex for the problem to me..
What if we instead interpret empty mdcKeyName as an intention to use entry.getKey() for both job config parameter and logging key?
That adds some convenience and eliminates the problem with empty keys.
WDYT?
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.
What is the purpose of the change
This is a follow-up to FLINK-40208, which introduced
JobMdcRegistryfor config-driven MDC enrichment in Flink jobs. This PR adds missing test coverage for three execution paths not exercised by the base PR, and adds a blank-key guard toMdcUtils.Brief change log
Verifying this change
Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (claude-sonnet-4-6)