Files
computer-playbook/scripts/tests/deploy/ci/assert_no_deprecation_warnings.sh
T
kevinveenbirkenbachandClaude Opus 4.8 f02da33128 fix(ci): clear compose deploy-gate deprecation warnings + tighten comment markers
The test-deploy-compose "Fail on deprecation warnings" gate failed ~10 apps
while the deploys themselves succeeded. Sources cleared:

- svc-db-postgres: community.postgresql `db` -> `login_db` (the `db` param
  alias is deprecated, removed in collection 5.0.0)
- assert_no_deprecation_warnings.sh: ignore ansible-core's legacy filter/test
  PluginLoader-aliases deprecation (needs a collection migration with
  meta/runtime.yml, not fixable in role YAML)
- joomla/wordpress: drop the `{{ }}` delimiters from task conditionals
  (when/until/changed_when), per ansible-core 2.23

Also drop `upstream`/`compat`/`security`/`bug` from the comment-policy markers
and delete those comments from the joomla install tasks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 22:48:26 +02:00

30 lines
980 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]:'
# Exception: exclude ansible-core 2.20 legacy filter/test PluginLoader deprecation; needs a collection migration, not fixable in role YAML.
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}."