hello-stephen commented on code in PR #70385:
URL: https://github.com/apache/doris/pull/70385#discussion_r4783167263
##########
docker/thirdparties/run-thirdparties-docker.sh:
##########
@@ -1454,54 +1454,37 @@ start_hive_stack() {
}
start_iceberg() {
- # iceberg
- ICEBERG_DIR=${ROOT}/docker-compose/iceberg
+ local iceberg_dir="${ROOT}/docker-compose/iceberg"
+ local compose_file="${iceberg_dir}/iceberg.yaml"
+ local env_file="${iceberg_dir}/iceberg.env"
+
if [[ "${HOST_OS}" == "Darwin" ]]; then
export ICEBERG_POSTGRES_IMAGE="${ICEBERG_POSTGRES_IMAGE:-postgres:14}"
fi
- render_uid_template "${ROOT}/docker-compose/iceberg/iceberg.yaml.tpl"
"${ROOT}/docker-compose/iceberg/iceberg.yaml"
- render_uid_template "${ROOT}/docker-compose/iceberg/entrypoint.sh.tpl"
"${ROOT}/docker-compose/iceberg/entrypoint.sh"
- cp "${ROOT}/docker-compose/iceberg/entrypoint.sh"
"${ROOT}/docker-compose/iceberg/scripts/entrypoint.sh"
- register_stack_metadata "iceberg"
"${ROOT}/docker-compose/iceberg/iceberg.yaml"
"${ROOT}/docker-compose/iceberg/iceberg.env"
- compose_down_stack "${ROOT}/docker-compose/iceberg/iceberg.yaml"
"${ROOT}/docker-compose/iceberg/iceberg.env" --remove-orphans
- if [[ "${STOP}" -ne 1 ]]; then
- # data/ is extracted from the fixture archive once and then reused. A
data/ from an older archive lacks
- # jars that iceberg.yaml now mounts, and Compose would create empty
directories in their place, so
- # start over from the current archive.
- if [[ -d "${ICEBERG_DIR}/data" ]]; then
- local jar
- for jar in $(grep -o '\./data/input/jars/[^:]*\.jar'
"${ICEBERG_DIR}/iceberg.yaml"); do
- if [[ ! -f "${ICEBERG_DIR}/${jar#./}" ]]; then
- echo "${ICEBERG_DIR}/${jar#./} is missing,
${ICEBERG_DIR}/data is from an older archive"
- reset_data_dirs "${ICEBERG_DIR:?}/data"
- rmdir "${ICEBERG_DIR}/data"
- break
- fi
- done
- fi
- if [[ ! -d "${ICEBERG_DIR}/data" ]]; then
- echo "${ICEBERG_DIR}/data does not exist"
- (
- cd "${ICEBERG_DIR}" || exit 1
- rm -f iceberg_data*.zip
- if [[ "${HOST_OS}" == "Darwin" ]]; then
- curl -fL -o iceberg_data_spark40_paimon142.zip \
-
"https://${s3BucketName}.${s3Endpoint}/regression/datalake/pipeline_data/iceberg_data_spark40_paimon142.zip"
- else
- wget -P "${ROOT}/docker-compose/iceberg" \
-
"https://${s3BucketName}.${s3Endpoint}/regression/datalake/pipeline_data/iceberg_data_spark40_paimon142.zip"
- fi
- unzip iceberg_data_spark40_paimon142.zip
- mv iceberg_data data
- rm -rf iceberg_data_spark40_paimon142.zip
- )
- else
- echo "${ICEBERG_DIR}/data exist, continue !"
- fi
+ render_uid_template "${compose_file}.tpl" "${compose_file}"
+ render_uid_template "${iceberg_dir}/entrypoint.sh.tpl"
"${iceberg_dir}/scripts/entrypoint.sh"
+ register_stack_metadata "iceberg" "${compose_file}" "${env_file}"
+
+ if [[ "${STOP}" -eq 1 ]]; then
+ compose_down_stack "${compose_file}" "${env_file}" --remove-orphans
+ return
+ fi
- bash "${ICEBERG_DIR}/encryption/prepare-jars.sh"
- compose_up_stack "${ROOT}/docker-compose/iceberg/iceberg.yaml"
"${ROOT}/docker-compose/iceberg/iceberg.env" -d --wait
+ if [[ ! -d "${iceberg_dir}/data" ]]; then
Review Comment:
[P2] Detect incomplete fixture data before skipping extraction. The README’s
scan-planning-only startup creates `data/input/minio_data` through MinIO’s bind
mount without unpacking the fixture archive. After stopping that stack, a full
`-c iceberg` launch sees `data/` and skips extraction, leaving the seeded
PostgreSQL metadata and MinIO objects missing. Existing suites such as
`test_iceberg_equality_delete` then cannot find their seeded tables. Check for
the archive payload or an extraction marker so a bind-created directory can be
recovered.
##########
docker/thirdparties/docker-compose/iceberg/prepare-jars.sh:
##########
@@ -30,30 +31,30 @@ sha256_file() {
fi
}
-# These isolated reference jars must not replace the existing Spark fixture's
SDK.
-while read -r module expected_sha256; do
- filename="${module}-1.12.0.jar"
- destination="${fixture_dir}/jars/${filename}"
+# Use repository-relative coordinates so each version and checksum is listed
once.
+while read -r artifact expected_sha256; do
+ destination="${cache_dir}/${artifact##*/}"
if [[ -f "${destination}" ]] && [[ "$(sha256_file "${destination}")" ==
"${expected_sha256}" ]]; then
- # Spark needs other-user read access; readable shared caches may
belong to another user.
- if [[ -z "$(find -L "${destination}" -prune -perm -004 -print)" ]];
then
- chmod 0644 "${destination}"
- fi
continue
Review Comment:
[P3] Keep verified cached JARs readable by the encryption fixture. A
reference JAR restored with mode `0600` passes this check when the launcher
owns it, but the non-root encryption container cannot read it through the bind
mount and `javac` fails before the service starts. The previous cache-hit path
repaired the file mode. Preserve that behavior for verified cache hits.
--
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]