rhauch commented on a change in pull request #9172: URL: https://github.com/apache/kafka/pull/9172#discussion_r469574130
########## File path: connect/runtime/src/test/java/org/apache/kafka/connect/integration/TransformationIntegrationTest.java ########## @@ -318,4 +323,61 @@ public void testFilterOnHasHeaderKeyWithSourceConnector() throws Exception { // delete connector connect.deleteConnector(CONNECTOR_NAME); } + + /** + * Test the {@link Filter} transformer with a + * {@link HasHeaderKey} predicate on a source connector. + */ + @Test + public void testFilterOnHasHeaderKeyWithSourceConnectorAndTopicCreation() throws Exception { Review comment: Do we need another test here, or could we essentially replace the previous test with this one? Either way, the test that uses topic creation should probably have a comment (either in the method JavaDoc or in a line comment below) that explicitly mentions enabling topic creation. We don't want someone removing the topic creation configs at a later time. WDYT? ########## File path: connect/runtime/src/main/java/org/apache/kafka/connect/runtime/SourceConnectorConfig.java ########## @@ -129,7 +129,8 @@ public SourceConnectorConfig(Plugins plugins, Map<String, String> props, boolean propsWithoutRegexForDefaultGroup.entrySet() .removeIf(e -> e.getKey().equals(DEFAULT_TOPIC_CREATION_PREFIX + INCLUDE_REGEX_CONFIG) || e.getKey().equals(DEFAULT_TOPIC_CREATION_PREFIX + EXCLUDE_REGEX_CONFIG)); - enrichedSourceConfig = new EnrichedSourceConnectorConfig(enrich(defaultConfigDef, props, + enrichedSourceConfig = new EnrichedSourceConnectorConfig(plugins, + enrich(defaultConfigDef, props, defaultGroup), propsWithoutRegexForDefaultGroup); Review comment: Super tiny nit: the wrapping even from the original was confusing, and maybe it's worth changing one more line and cleaning up the wrapping: ```suggestion enrichedSourceConfig = new EnrichedSourceConnectorConfig(plugins, enrich(defaultConfigDef, props, defaultGroup), propsWithoutRegexForDefaultGroup); ``` WDYT? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org