Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions regression-test/pipeline/common/doris-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -674,17 +674,19 @@ archive_doris_logs() {
(
cd "${DORIS_HOME}" || return 1
cp --parents -rf "fe/conf" "${archive_dir}"/
if sed -i "s/${hwYunAk:-}//g;s/${hwYunSk:-}//g;s/${s3SourceAk:-}//g;s/${s3SourceSk:-}//g;s/${txYunAk:-}//g;s/${txYunSk:-}//g" fe/log/* &>/dev/null; then :; fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This redaction can be skipped in normal cloud/vault runs when the optional Huawei credentials are unset. cloud_p0/run.sh and vault_p0/run.sh require s3SourceAk/s3SourceSk but only warn for missing hwYunAk/hwYunSk; with hwYunAk empty this expands to an invalid leading sed expression (s//g...), sed exits before processing the later required S3 credentials, and the failure is suppressed by &>/dev/null, so the archive can still contain s3SourceAk/s3SourceSk. Please build the redaction script only from non-empty values (and apply the same fix to the duplicated BE/regression/conf redaction lines) instead of interpolating empty variables directly.

cp --parents -rf "fe/log" "${archive_dir}"/
cp --parents -rf "be/conf" "${archive_dir}"/
if sed -i "s/${hwYunAk:-}//g;s/${hwYunSk:-}//g;s/${s3SourceAk:-}//g;s/${s3SourceSk:-}//g;s/${txYunAk:-}//g;s/${txYunSk:-}//g" be/log/* &>/dev/null; then :; fi
cp --parents -rf "be/log" "${archive_dir}"/
if [[ -d "${DORIS_HOME}"/regression-test/log ]]; then
# try to hide ak and sk
if sed -i "s/${cos_ak:-}//g;s/${cos_sk:-}//g" regression-test/log/* &>/dev/null; then :; fi
if sed -i "s/${hwYunAk:-}//g;s/${hwYunSk:-}//g;s/${s3SourceAk:-}//g;s/${s3SourceSk:-}//g;s/${txYunAk:-}//g;s/${txYunSk:-}//g" regression-test/log/* &>/dev/null; then :; fi
cp --parents -rf "regression-test/log" "${archive_dir}"/
fi
if [[ -d "${DORIS_HOME}"/../regression-test/conf ]]; then
# try to hide ak and sk
if sed -i "s/${cos_ak:-}//g;s/${cos_sk:-}//g" ../regression-test/conf/* &>/dev/null; then :; fi
if sed -i "s/${hwYunAk:-}//g;s/${hwYunSk:-}//g;s/${s3SourceAk:-}//g;s/${s3SourceSk:-}//g;s/${txYunAk:-}//g;s/${txYunSk:-}//g" ../regression-test/conf/* &>/dev/null; then :; fi
mkdir -p "${archive_dir}"/regression-test/conf
cp -rf ../regression-test/conf/* "${archive_dir}"/regression-test/conf/
fi
Expand Down
Loading