sankalpsthakur opened a new pull request, #29235: URL: https://github.com/apache/flink/pull/29235
## What is the purpose of the change `JobIDLoggingITCase.testJobIDLogging` failed in nightly CI because `TaskExecutor` can log `Freeing inactive slots for job …` for a **different** job while this test is asserting MDC for the job it just submitted. Ignore patterns in `JobIDLoggingUtil` previously applied only to events **missing** the MDC key. A log from another job still carries `flink-job-id`, so the assertion failed as "events with a wrong value". The sibling test `testEnrichedMdcLogging` already ignored this message; `testJobIDLogging` did not. ## Brief change log - Apply ignore patterns before the MDC key/value check in `JobIDLoggingUtil`, so matching events are skipped even when they carry a different job id - Ignore `Freeing inactive slots.*` in `JobIDLoggingITCase.testJobIDLogging` (same as `testEnrichedMdcLogging`) - Add unit tests for the ignore-pattern behavior in `JobIDLoggingUtilTest` ## Verifying this change This change added tests and can be verified as follows: - `JobIDLoggingUtilTest` covers: ignored events with a different MDC value pass; unignored wrong-value events still fail; missing-key ignore still works - Local result: `./mvnw -pl flink-test-utils-parent/flink-test-utils-junit test -Dtest=JobIDLoggingUtilTest` — 3 tests, 0 failures; Checkstyle 0 violations; Spotless clean - Existing `JobIDLoggingITCase` remains the MiniCluster coverage for job-id logging ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): no - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no - The serializers: no - The runtime per-record code paths (performance sensitive): no - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no - The S3 file system connector: no ## Documentation - Does this pull request introduce a new feature? no - If yes, how is the feature documented? not applicable ## Apache ICLA Apache requires an ICLA on file before a contribution can be merged. Contributor: Sankalp Thakur (`sankalpsthakur`). This PR only notes the ICLA requirement; a committer should confirm ICLA status before merge. This change does not claim that an ICLA has been signed. JIRA: https://issues.apache.org/jira/browse/FLINK-40664 --- ##### Was generative AI tooling used to co-author this PR? - [x] Yes (please specify the tool below) Generated-by: Cursor Grok 4.6 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
