Copilot commented on code in PR #8723:
URL: https://github.com/apache/hbase/pull/8723#discussion_r4149345618
##########
dev-support/read-replica/run_read_replica_integration_tests.sh:
##########
@@ -143,14 +204,26 @@ 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_START=${SECONDS}
+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 \
Review Comment:
When the default `OUTPUT_DIR` is used, the outer driver creates
`${REPLICA_DIR}/output`, and subsequent runs leave the HTML/JUnit/timing
artifacts there. This rsync block does not exclude that directory, so those
growing artifacts are copied into every Docker build context (and can include
data from the previous run); exclude `dev-support/read-replica/output` or keep
the output directory outside `HBASE_ROOT`.
##########
dev-support/read-replica/run_read_replica_integration_tests.sh:
##########
@@ -143,14 +204,26 @@ 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.).
Review Comment:
There is no root `.dockerignore` in this repository, and the read-replica
build context has no `.dockerignore` either, so this comment cites a
nonexistent source of truth. Replace it with a description of the exclusions
maintained directly in this command to avoid misleading future updates.
--
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]