mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-18 18:46:17 +00:00
fix(ci): ignore strings in s3s footprint ratchet (#5787)
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
# The migration's goal is to shrink the direct s3s surface, so new code must
|
# The migration's goal is to shrink the direct s3s surface, so new code must
|
||||||
# not grow it. Two counters are ratcheted, baselines verified on 2026-08-05:
|
# not grow it. Two counters are ratcheted, baselines verified on 2026-08-05:
|
||||||
#
|
#
|
||||||
# - files importing s3s: rg -l 's3s::' --type rust (files)
|
# - files referencing s3s paths: rg -l "$S3S_PATH_PATTERN" --type rust (files)
|
||||||
# - s3_error! invocation lines: rg -c 's3_error!' --type rust (summed)
|
# - s3_error! invocation lines: rg -c 's3_error!' --type rust (summed)
|
||||||
#
|
#
|
||||||
# Either count exceeding its baseline fails the check with the offending
|
# Either count exceeding its baseline fails the check with the offending
|
||||||
@@ -24,7 +24,8 @@ cd "$(dirname "$0")/.."
|
|||||||
|
|
||||||
# Baselines verified on 2026-08-06. Lower-only; see header.
|
# Baselines verified on 2026-08-06. Lower-only; see header.
|
||||||
S3S_IMPORT_FILES_BASELINE=236
|
S3S_IMPORT_FILES_BASELINE=236
|
||||||
S3_ERROR_LINES_BASELINE=1680
|
S3_ERROR_LINES_BASELINE=1679
|
||||||
|
S3S_PATH_PATTERN='(^|[^"[:alnum:]_])s3s::'
|
||||||
|
|
||||||
TMP_DIR="$(mktemp -d)"
|
TMP_DIR="$(mktemp -d)"
|
||||||
trap 'rm -rf "$TMP_DIR"' EXIT
|
trap 'rm -rf "$TMP_DIR"' EXIT
|
||||||
@@ -41,7 +42,7 @@ run_rg_to() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
run_rg_to "$TMP_DIR/import_files" -l 's3s::' --type rust
|
run_rg_to "$TMP_DIR/import_files" -l "$S3S_PATH_PATTERN" --type rust
|
||||||
run_rg_to "$TMP_DIR/error_lines" -c 's3_error!' --type rust
|
run_rg_to "$TMP_DIR/error_lines" -c 's3_error!' --type rust
|
||||||
|
|
||||||
s3s_import_files="$(grep -c . "$TMP_DIR/import_files" || true)"
|
s3s_import_files="$(grep -c . "$TMP_DIR/import_files" || true)"
|
||||||
@@ -75,7 +76,7 @@ check_ratchet() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_ratchet "files importing s3s" "$s3s_import_files" "$S3S_IMPORT_FILES_BASELINE" \
|
check_ratchet "files importing s3s" "$s3s_import_files" "$S3S_IMPORT_FILES_BASELINE" \
|
||||||
"rg -l 's3s::' --type rust"
|
"rg -l '$S3S_PATH_PATTERN' --type rust"
|
||||||
check_ratchet "s3_error! invocation lines" "$s3_error_lines" "$S3_ERROR_LINES_BASELINE" \
|
check_ratchet "s3_error! invocation lines" "$s3_error_lines" "$S3_ERROR_LINES_BASELINE" \
|
||||||
"rg -c 's3_error!' --type rust"
|
"rg -c 's3_error!' --type rust"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user