Skip to content

Commit 01975b6

Browse files
hello-stephenclaude
authored andcommitted
[fix](ci) rm some infos (#63228)
### What problem does this PR solve? Issue Number: close #xxx Related PR: #xxx Problem Summary: ### Release note None ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [ ] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [ ] No. - [ ] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [ ] No. - [ ] Yes. <!-- Add document PR link here. eg: apache/doris-website#1214 --> ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into --> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9437c90 commit 01975b6

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

regression-test/pipeline/common/doris-utils.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,17 @@ _monitor_regression_log() {
662662

663663
}
664664

665+
_redact_creds() {
666+
local expr="" v escaped
667+
for v in "${hwYunAk:-}" "${hwYunSk:-}" "${s3SourceAk:-}" "${s3SourceSk:-}" "${txYunAk:-}" "${txYunSk:-}"; do
668+
if [[ -n "${v}" ]]; then
669+
escaped=$(printf '%s' "${v}" | sed 's/[]\/$*.^[]/\\&/g')
670+
expr+="s/${escaped}//g;"
671+
fi
672+
done
673+
[[ -n "${expr}" ]] && sed -i "${expr}" "$@" &>/dev/null || true
674+
}
675+
665676
archive_doris_logs() {
666677
if [[ ! -d "${DORIS_HOME:-}" ]]; then return 1; fi
667678
local archive_name="$1"
@@ -674,17 +685,19 @@ archive_doris_logs() {
674685
(
675686
cd "${DORIS_HOME}" || return 1
676687
cp --parents -rf "fe/conf" "${archive_dir}"/
688+
_redact_creds fe/log/*
677689
cp --parents -rf "fe/log" "${archive_dir}"/
678690
cp --parents -rf "be/conf" "${archive_dir}"/
691+
_redact_creds be/log/*
679692
cp --parents -rf "be/log" "${archive_dir}"/
680693
if [[ -d "${DORIS_HOME}"/regression-test/log ]]; then
681694
# try to hide ak and sk
682-
if sed -i "s/${cos_ak:-}//g;s/${cos_sk:-}//g" regression-test/log/* &>/dev/null; then :; fi
695+
_redact_creds regression-test/log/*
683696
cp --parents -rf "regression-test/log" "${archive_dir}"/
684697
fi
685698
if [[ -d "${DORIS_HOME}"/../regression-test/conf ]]; then
686699
# try to hide ak and sk
687-
if sed -i "s/${cos_ak:-}//g;s/${cos_sk:-}//g" ../regression-test/conf/* &>/dev/null; then :; fi
700+
_redact_creds ../regression-test/conf/*
688701
mkdir -p "${archive_dir}"/regression-test/conf
689702
cp -rf ../regression-test/conf/* "${archive_dir}"/regression-test/conf/
690703
fi

0 commit comments

Comments
 (0)