fix(release): keep large snapshots attached and low impact
Managed validation / ${{ inputs.profile || 'full' }} (pull_request) Failing after 1m35s
GeoIntel release gates / Compile, test, contracts and builds (pull_request) Failing after 1m43s
GeoIntel release gates / Python and npm vulnerability policy (pull_request) Failing after 32s
GeoIntel release gates / Production AI image, SBOM and container scan (pull_request) Failing after 31s
GeoIntel release gates / Deploy exact gated revision to Unraid (pull_request) Skipped
Managed validation / ${{ inputs.profile || 'full' }} (pull_request) Failing after 1m35s
GeoIntel release gates / Compile, test, contracts and builds (pull_request) Failing after 1m43s
GeoIntel release gates / Python and npm vulnerability policy (pull_request) Failing after 32s
GeoIntel release gates / Production AI image, SBOM and container scan (pull_request) Failing after 31s
GeoIntel release gates / Deploy exact gated revision to Unraid (pull_request) Skipped
This commit is contained in:
@@ -355,14 +355,34 @@ print(
|
||||
PY
|
||||
}
|
||||
|
||||
run_low_impact() {
|
||||
local priority_command=()
|
||||
|
||||
# Backups are mandatory, but their first byte-complete copy and SHA-256
|
||||
# verification must not starve the live Unraid services. BusyBox hosts do
|
||||
# not always provide both tools, so use every available scheduler without
|
||||
# weakening the backup when one is absent.
|
||||
if command -v ionice >/dev/null 2>&1; then
|
||||
priority_command+=(ionice -c 2 -n 7)
|
||||
fi
|
||||
if command -v nice >/dev/null 2>&1; then
|
||||
priority_command+=(nice -n 10)
|
||||
fi
|
||||
if [ "${#priority_command[@]}" -eq 0 ]; then
|
||||
"$@"
|
||||
return
|
||||
fi
|
||||
"${priority_command[@]}" "$@"
|
||||
}
|
||||
|
||||
select_verified_link_dest() {
|
||||
local candidate=""
|
||||
GEOINTEL_BACKUP_LINK_DEST=""
|
||||
while IFS= read -r candidate; do
|
||||
if (
|
||||
cd "$candidate" \
|
||||
&& sha256sum -c CHECKSUMS.sha256 >/dev/null \
|
||||
&& python3 "$ROOT/scripts/release_backup_snapshot.py" verify-backup --backup-dir "$candidate"
|
||||
&& run_low_impact sha256sum -c CHECKSUMS.sha256 >/dev/null \
|
||||
&& run_low_impact python3 "$ROOT/scripts/release_backup_snapshot.py" verify-backup --backup-dir "$candidate"
|
||||
); then
|
||||
GEOINTEL_BACKUP_LINK_DEST="$candidate"
|
||||
echo "Using verified prior byte snapshot as link-dest: ${candidate}"
|
||||
@@ -482,7 +502,7 @@ PY
|
||||
|
||||
GEOINTEL_PREDEPLOY_BACKUP_DIR="${GEOINTEL_BACKUPS_PATH%/}/${release_id}"
|
||||
echo "Creating mandatory pre-deploy backup ${release_id}..."
|
||||
if ! bash scripts/backup_release_state.sh \
|
||||
if ! run_low_impact bash scripts/backup_release_state.sh \
|
||||
--container geointel \
|
||||
--output-root "$GEOINTEL_BACKUPS_PATH" \
|
||||
--release-id "$release_id" \
|
||||
@@ -491,7 +511,7 @@ PY
|
||||
--inventory-mode sha256 \
|
||||
--rollback-image-tag "$GEOINTEL_PREDEPLOY_ROLLBACK_TAG" \
|
||||
"${backup_link_args[@]}" \
|
||||
|| ! bash scripts/verify_release_backup.sh \
|
||||
|| ! run_low_impact bash scripts/verify_release_backup.sh \
|
||||
--container geointel \
|
||||
--backup-dir "$GEOINTEL_PREDEPLOY_BACKUP_DIR"; then
|
||||
echo "Pre-deploy backup failed; restarting the unchanged current release." >&2
|
||||
|
||||
Reference in New Issue
Block a user