Copilot commented on code in PR #61754:
URL: https://github.com/apache/doris/pull/61754#discussion_r2992795039


##########
fe/.mvn/maven-build-cache-config.xml:
##########
@@ -0,0 +1,47 @@
+<?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.
+-->
+<cache xmlns="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0
+                           
https://maven.apache.org/xsd/build-cache-config-1.0.0.xsd";>
+    <configuration>
+        <enabled>true</enabled>
+        <hashAlgorithm>XX</hashAlgorithm>
+    </configuration>
+    <input>
+        <global>
+            <glob>{*.java,*.g4,*.xml,*.properties}</glob>

Review Comment:
   These patterns rely on brace expansion (`{...}`), which is not universally 
supported across glob implementations. If Maven Build Cache’s scanner doesn’t 
support brace expansion, these patterns may match nothing, and the intended 
inputs won’t be included in the cache key. To make matching unambiguous, split 
them into multiple entries (e.g., separate `<glob>` elements / separate 
`<include>` entries per extension) using the documented pattern syntax for the 
extension.



##########
fe/.mvn/maven-build-cache-config.xml:
##########
@@ -0,0 +1,47 @@
+<?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.
+-->
+<cache xmlns="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0
+                           
https://maven.apache.org/xsd/build-cache-config-1.0.0.xsd";>
+    <configuration>
+        <enabled>true</enabled>
+        <hashAlgorithm>XX</hashAlgorithm>
+    </configuration>
+    <input>
+        <global>
+            <glob>{*.java,*.g4,*.xml,*.properties}</glob>
+            <includes>
+                <include>src/</include>
+                <!-- External source directories under gensrc/ are referenced 
by plugins via
+                     Maven properties (e.g. 
${project.parent.basedir}/../gensrc/thrift).
+                     The cache extension's tagScanConfig cannot resolve these 
Maven properties,
+                     so we must include these directories globally. This means 
all modules'
+                     cache keys include these files. The practical impact is 
minimal: when
+                     gensrc files change, the 14 non-dependent modules rebuild 
in < 5s total,
+                     while fe-thrift (23s) and fe-core (1:40) need to rebuild 
regardless.

Review Comment:
   The comment includes specific module counts and timing numbers (e.g., “14 
non-dependent modules”, “< 5s”, “23s”, “1:40”) that are likely to become 
outdated and misleading over time. Consider replacing these with a qualitative 
explanation (e.g., “expect minor extra invalidations for unaffected modules”) 
and keep the JIRA link for details.
   ```suggestion
                        cache keys include these files. In practice, this 
causes some additional
                        cache invalidations for modules that are unaffected by 
gensrc changes, but
                        the overall impact on build performance has been 
evaluated as minor.
   ```



##########
fe/.mvn/maven-build-cache-config.xml:
##########
@@ -0,0 +1,47 @@
+<?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.
+-->
+<cache xmlns="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0
+                           
https://maven.apache.org/xsd/build-cache-config-1.0.0.xsd";>
+    <configuration>
+        <enabled>true</enabled>
+        <hashAlgorithm>XX</hashAlgorithm>
+    </configuration>
+    <input>
+        <global>
+            <glob>{*.java,*.g4,*.xml,*.properties}</glob>
+            <includes>
+                <include>src/</include>
+                <!-- External source directories under gensrc/ are referenced 
by plugins via
+                     Maven properties (e.g. 
${project.parent.basedir}/../gensrc/thrift).
+                     The cache extension's tagScanConfig cannot resolve these 
Maven properties,
+                     so we must include these directories globally. This means 
all modules'
+                     cache keys include these files. The practical impact is 
minimal: when
+                     gensrc files change, the 14 non-dependent modules rebuild 
in < 5s total,
+                     while fe-thrift (23s) and fe-core (1:40) need to rebuild 
regardless.
+                     See: https://issues.apache.org/jira/browse/MBUILDCACHE-83 
-->
+                <include glob="*.thrift" 
recursive="true">../../gensrc/thrift</include>
+                <include glob="*.proto" 
recursive="true">../../gensrc/proto</include>
+                <include glob="{*.sh,*.py}" 
recursive="true">../../gensrc/script</include>

Review Comment:
   Including `gensrc/` inputs under `<global>` means any change to these files 
invalidates cache entries for all FE modules, even those that don’t consume 
thrift/proto/scripts. If the build-cache config schema supports scoping inputs 
per project/module, consider narrowing these includes to the specific 
modules/goals that actually depend on them to reduce cache churn (optional 
optimization; current approach is functional but broader than necessary).



##########
fe/.mvn/maven-build-cache-config.xml:
##########
@@ -0,0 +1,47 @@
+<?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.
+-->
+<cache xmlns="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+       xsi:schemaLocation="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0
+                           
https://maven.apache.org/xsd/build-cache-config-1.0.0.xsd";>
+    <configuration>
+        <enabled>true</enabled>
+        <hashAlgorithm>XX</hashAlgorithm>
+    </configuration>
+    <input>
+        <global>
+            <glob>{*.java,*.g4,*.xml,*.properties}</glob>
+            <includes>
+                <include>src/</include>
+                <!-- External source directories under gensrc/ are referenced 
by plugins via
+                     Maven properties (e.g. 
${project.parent.basedir}/../gensrc/thrift).
+                     The cache extension's tagScanConfig cannot resolve these 
Maven properties,
+                     so we must include these directories globally. This means 
all modules'
+                     cache keys include these files. The practical impact is 
minimal: when
+                     gensrc files change, the 14 non-dependent modules rebuild 
in < 5s total,
+                     while fe-thrift (23s) and fe-core (1:40) need to rebuild 
regardless.
+                     See: https://issues.apache.org/jira/browse/MBUILDCACHE-83 
-->
+                <include glob="*.thrift" 
recursive="true">../../gensrc/thrift</include>
+                <include glob="*.proto" 
recursive="true">../../gensrc/proto</include>
+                <include glob="{*.sh,*.py}" 
recursive="true">../../gensrc/script</include>

Review Comment:
   These patterns rely on brace expansion (`{...}`), which is not universally 
supported across glob implementations. If Maven Build Cache’s scanner doesn’t 
support brace expansion, these patterns may match nothing, and the intended 
inputs won’t be included in the cache key. To make matching unambiguous, split 
them into multiple entries (e.g., separate `<glob>` elements / separate 
`<include>` entries per extension) using the documented pattern syntax for the 
extension.



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