github-actions[bot] commented on code in PR #70249:
URL: https://github.com/apache/doris/pull/70249#discussion_r4480230615


##########
build.sh:
##########
@@ -1348,6 +1350,10 @@ if [[ "${BUILD_FE}" -eq 1 ]]; then
     # Deploy connector provider plugins as independent plugin directories.
     # Each sub-directory is one connector backend loaded at runtime by 
ConnectorPluginManager.
     CONN_PLUGIN_DIR="${DORIS_OUTPUT}/fe/plugins/connector"
+    # Keep this dependency-only archive out of auto-discovery, which requires 
a provider class.
+    mkdir -p "${CONN_PLUGIN_DIR}"

Review Comment:
   [P1] Make the MongoDB zip available on Maven cache hits before copying it. 
The assembly is generated only by the package-phase maven-assembly-plugin, 
while fe/.mvn/maven-build-cache-config.xml states cache hits restore a module's 
jar and nothing else. A clean FE build that hits the cache therefore has no 
target/doris-fe-connector-mongodb.zip, and this unconditional cp exits the 
build. Force the assembly execution/output on cache hits or guard and 
regenerate the zip before staging it.



##########
fe/fe-connector/fe-connector-mongodb/pom.xml:
##########
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.doris</groupId>
+        <artifactId>fe-connector</artifactId>
+        <version>${revision}</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>fe-connector-mongodb</artifactId>
+    <packaging>jar</packaging>
+    <name>Doris FE Connector - MongoDB Dependencies</name>
+    <description>Client dependency bundle for the native MongoDB 
connector.</description>
+    <properties>
+        <mongodb.driver.version>5.14.0</mongodb.driver.version>
+        <!-- Override the older FE-wide pin to reject oversized Snappy 
allocations and fix stream handling. -->
+        <mongodb.snappy-java.version>1.1.10.10</mongodb.snappy-java.version>
+        <mongodb.zstd-jni.version>1.5.7-25</mongodb.zstd-jni.version>
+    </properties>
+    <dependencyManagement>
+        <dependencies>
+            <!-- Align the sync driver, core and BSON without changing other 
plugins' closures. -->
+            <dependency>
+                <groupId>org.mongodb</groupId>
+                <artifactId>mongodb-driver-bom</artifactId>
+                <version>${mongodb.driver.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+    <dependencies>
+        <dependency>
+            <groupId>org.mongodb</groupId>
+            <artifactId>mongodb-driver-sync</artifactId>

Review Comment:
   [P2] Add the missing bson-record-codec runtime dependency. 
mongodb-driver-core 5.14.0 marks org.mongodb:bson-record-codec optional, so the 
direct mongodb-driver-sync dependency does not bring it into plugin-zip.xml's 
runtime dependencySet. The README and dist license inventory promise this jar, 
and a future provider using the record codec will hit 
ClassNotFoundException/NoClassDefFoundError from the staged archive. Declare it 
explicitly (the imported BOM supplies 5.14.0) or remove the claim and inventory 
entry.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to