github-actions[bot] commented on code in PR #68689:
URL: https://github.com/apache/doris/pull/68689#discussion_r4151729478
##########
build.sh:
##########
@@ -495,7 +496,8 @@ if [[ ! -f
"${DORIS_THIRDPARTY}/installed/lib/${LAST_THIRDPARTY_LIB}" ||
! -f "${DORIS_THIRDPARTY}/installed/include/paimon_rust/paimon.h" ||
! -s "${DORIS_THIRDPARTY}/installed/lib64/libpaimon_c.a" ||
! -s "${DORIS_THIRDPARTY}/installed/include/paimon_rust/paimon.h" ||
- -e "${DORIS_THIRDPARTY}/installed/lib64/.paimon-installing" ]]; then
+ -e "${DORIS_THIRDPARTY}/installed/lib64/.paimon-installing" ]] ||
+ ! lance_c_install_is_current "${DORIS_HOME}/thirdparty"
"${DORIS_THIRDPARTY}/installed"; then
Review Comment:
[P2] Validate external rebuild inputs before deleting `installed`. When
`DORIS_THIRDPARTY` points to a partially updated source tree containing this
builder but missing `lance-install.sh`, the new fingerprint check enters this
branch, the existing builder-presence check passes, and `rm -rf installed`
runs. The builder then exits at its unconditional `source` of the missing
helper, leaving the entire prefix erased. Check the required external helper
and matching definitions before deletion, or stage the replacement; cover this
case in the harness.
##########
thirdparty/test/lance-install-test.sh:
##########
@@ -0,0 +1,148 @@
+#!/usr/bin/env bash
+# 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.
+
+set -euo pipefail
+ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
+work="$(mktemp -d)"
+trap 'rm -rf "${work}"' EXIT
+mkdir -p "${work}/repo/thirdparty/patches" "${work}/external"
+cp "${ROOT}/thirdparty/vars.sh" "${work}/repo/thirdparty/"
+cp "${ROOT}/thirdparty/patches/lance-c-foyer.patch"
"${work}/repo/thirdparty/patches/"
+# Extract the real build gate; all destructive operations stay inside this
temporary install.
+sed -n '/^# build thirdparty libraries if necessary/,/^update_submodule()/p'
"${ROOT}/build.sh" \
+ | sed '$d' > "${work}/gate.sh"
+export DORIS_HOME="${work}/repo" DORIS_THIRDPARTY="${work}/external"
+export TARGET_SYSTEM=Linux CLEAN=0 PARALLEL=1
+export TEST_HELPER="${ROOT}/thirdparty/lance-install.sh"
+if [[ -f "${TEST_HELPER}" ]]; then
+ cp "${TEST_HELPER}" "${work}/repo/thirdparty/"
+fi
+cat > "${DORIS_THIRDPARTY}/build-thirdparty.sh" <<'BUILDER'
+set -euo pipefail
+source "${TEST_HELPER}"
+echo rebuilt >> "${DORIS_THIRDPARTY}/builds"
+installed="${DORIS_THIRDPARTY}/installed"
+mkdir -p "${installed}/lib/hadoop_hdfs/native"
"${installed}/lib/hadoop_hdfs_3_4/native" "${installed}/lib64" \
+ "${installed}/include/lance" "${installed}/include/paimon_rust"
+for file in lib/hadoop_hdfs/native/libhdfs.a
lib/hadoop_hdfs_3_4/native/libhdfs.a \
+ lib64/liblance_c.a lib64/libpaimon_c.a \
+ include/lance/lance.h include/lance/lance.hpp
include/paimon_rust/paimon.h; do
+ echo artifact > "${installed}/${file}"
+done
+lance_c_install_fingerprint "${DORIS_HOME}/thirdparty" >
"${installed}/lib64/.lance-c-fingerprint"
Review Comment:
[P2] Make this builder stub use its external source definitions. The stub
stamps `${DORIS_HOME}/thirdparty`, while the real external builder sources its
own helper and stamps `${TP_DIR}`. Since this fixture gives
`${DORIS_THIRDPARTY}` only a builder script, its pin and patch mutation cases
pass even when an actual external tree cannot produce the requested revision.
Populate the external vars, patch, and helper; compute the stamp from that
tree; and add an incomplete-source case.
##########
thirdparty/test/lance-install-test.sh:
##########
@@ -0,0 +1,148 @@
+#!/usr/bin/env bash
+# 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.
+
+set -euo pipefail
Review Comment:
[P2] Run the Lance install regression harness in CI. This new script is not
referenced by the third-party `script_test` job (or any other workflow), so
that job can pass without exercising the fingerprint gate, stale external
builder, or interrupted publication cases added here. The file is also mode
100644, whereas that job invokes its other shell tests directly. Add it to the
job and make it executable, or invoke it with `bash`.
--
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]