Files
computer-playbook/scripts/tests/deploy/ci/assert_no_deprecation_warnings.sh
T
kevinveenbirkenbachandClaude Opus 5 3ea989a713 style: delete the comments the policy rejects across the tree
121 lines of restated code, step narration, section banners and rationale
prose, in workflow YAML, compose overrides, group_vars, lookup and action
plugins, role tasks, shell scripts and tests.

Three lines go the other way: where a reason has to survive it is now a
registered nocheck directive carrying it, not free prose. Two of them point at
an invariant further down the same file, the third records why an end-of-life
object store keeps no Playwright surface.

Scope was decided per line rather than per file. Classifying by "no additions"
would have swept roles/web-app-erpnext/tasks along with it, where the removed
lines are delegate_to, environment and cmd — a behaviour change that has no
business in a comment commit.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-03 01:23:08 +02:00

29 lines
840 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# SPOT: Fail a deploy when its Ansible output carries deprecation warnings, so
# they are caught in CI instead of silently piling up until the feature is
# removed upstream.
#
# Param:
# $1 = path to the deploy log (the tee'd ansible stdout/stderr)
MARKER='[DEPRECATION WARNING]:'
FRAMEWORK_NOISE='Instantiating (filter|test) PluginLoader with aliases'
log="${1:?usage: assert_no_deprecation_warnings.sh <deploy-log>}"
if [[ ! -f "${log}" ]]; then
echo "[ERROR] deprecation check: log not found: ${log}" >&2
exit 2
fi
if matches="$(grep -nF "${MARKER}" "${log}" | grep -vE "${FRAMEWORK_NOISE}")"; then
echo "::error::Deploy output contains Ansible deprecation warnings (${MARKER}):" >&2
printf '%s\n' "${matches}" >&2
exit 1
fi
echo "deprecation check: no '${MARKER}' entries in ${log}."