Copilot commented on code in PR #8723:
URL: https://github.com/apache/hbase/pull/8723#discussion_r4147963637
##########
dev-support/read-replica/build-images.sh:
##########
@@ -53,6 +52,7 @@ cd - || exit 1
# Build HBase Docker image
echo "Building HBase Docker image: ${HBASE_IMAGE}"
+export DOCKER_BUILDKIT=1
docker build -t "${HBASE_IMAGE}" ./
Review Comment:
Exporting `DOCKER_BUILDKIT=1` mutates the environment for the rest of the
script (and any subprocesses it spawns after this point). If the intent is just
to enable BuildKit for this build, scope it to the command invocation (e.g.,
prefix the `docker build` command) to reduce side effects and make the build
setting explicit at the call site.
##########
dev-support/read-replica/run_read_replica_integration_tests.sh:
##########
@@ -143,11 +143,19 @@ echo "DOCKER_COMPOSE_FILE=${DOCKER_COMPOSE_FILE}"
echo "HBASE_DATA_STORE_ROOT=${HBASE_DATA_STORE_ROOT}"
echo "realpath of HBASE_DATA_STORE_ROOT=$(realpath ${HBASE_DATA_STORE_ROOT})"
-# Clone HBase source for Docker build context (Docker COPY doesn't follow
symlinks)
-echo "Cloning HBase source into ${REPLICA_DIR}/hbase for Docker build
context..."
-rm -rf "${REPLICA_DIR}/hbase"
-git clone --local "${HBASE_ROOT}" "${REPLICA_DIR}/hbase"
-rm -rf "${REPLICA_DIR}/hbase/.git"
+# Docker COPY does not follow symlinks; stage a trimmed tree for the build
context.
+# Excludes match .dockerignore at repo root (target/, nested
read-replica/hbase, etc.).
+echo "Syncing trimmed HBase tree into ${REPLICA_DIR}/hbase for Docker build
context..."
+mkdir -p "${REPLICA_DIR}/hbase"
+rsync -a --delete \
+ --exclude .git \
+ --exclude target \
+ --exclude dev-support/read-replica/hbase \
+ --exclude dev-support/read-replica/tmp-read-replica-data \
+ --exclude node_modules \
+ --exclude .venv \
Review Comment:
Several `rsync --exclude` patterns look like directory excludes but are
specified without trailing slashes (e.g., `target`, `node_modules`, `.venv`).
In rsync, this can also match files with those names and can be less precise
than intended. Prefer directory-specific patterns (e.g., `target/`,
`node_modules/`, `.venv/`) and consider quoting patterns consistently (e.g.,
`--exclude='.git/'`) to make the intent unambiguous.
##########
dev-support/read-replica/run_read_replica_integration_tests.sh:
##########
@@ -25,7 +25,7 @@
# mentioned above.
#
# What it does:
-# 1. Clones the HBase source tree into a local directory for Docker build
context
+# 1. Uses the bind-mounted HBase checkout for Docker build (optional local
copy fallback)
Review Comment:
This step description says the Docker build uses a bind-mounted checkout
with an optional local-copy fallback, but the script now always prepares a
local build context via `rsync` into `${REPLICA_DIR}/hbase`. Update this line
to reflect the current behavior (e.g., ‘Rsync a trimmed HBase tree into … for
Docker build context’), to avoid misleading users.
--
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]