diff --git a/api/src/config/resolveFixedPatterns.ts b/api/src/config/resolveFixedPatterns.ts index 21cd7b6..ef78a05 100644 --- a/api/src/config/resolveFixedPatterns.ts +++ b/api/src/config/resolveFixedPatterns.ts @@ -36,6 +36,14 @@ const patterns: FixedPattern[] = [ messagePatterns: ['%No such device or address%'], note: 'Transient: storage/infrastructure during COMMIT; retry on next request', }, + // CRM: fix-duplicate-logo.js load failure (BIT-25223 ERRCLUSTER:33b4e527d8fd) + // File is present and protected by CopyWebpackPlugin + deploy gate; client-side noise + // filter (PR #684) suppresses at source. Chrome-style messages include the URL; this + // pattern resolves any that still reach the hub. Firefox-style resolved by bulk-resolve. + { + messagePatterns: ['%fix-duplicate-logo.js%'], + note: 'Fixed: fix-duplicate-logo.js present + protected (BIT-25223); client noise filter PR #684', + }, ]; export default patterns; diff --git a/deploy/lxc/webhook-deploy.sh b/deploy/lxc/webhook-deploy.sh index 17e17cf..e50f667 100755 --- a/deploy/lxc/webhook-deploy.sh +++ b/deploy/lxc/webhook-deploy.sh @@ -44,6 +44,28 @@ if [[ "${ER_WEBHOOK_RESTART_SERVICES:-1}" == "1" ]]; then systemctl restart bitreport-error-reporting-admin-ui.service systemctl restart bitreport-error-reporting-collector-worker.service systemctl restart bitreport-error-reporting-api.service + + # Auto-apply resolve-fixed-patterns after every deploy so code fixes clear stale incidents. + if [[ -n "${ERROR_RESOLVE_API_KEY:-}" ]]; then + _api_port="${ER_API_PORT:-3200}" + _ready=0 + for _i in $(seq 1 20); do + if curl -sf "http://localhost:${_api_port}/health" >/dev/null 2>&1; then + _ready=1; break + fi + sleep 3 + done + if [[ "${_ready}" == "1" ]]; then + curl -sf -X POST "http://localhost:${_api_port}/api/error-monitoring/resolve-fixed-patterns" \ + -H "Content-Type: application/json" \ + -d "{\"api_key\":\"${ERROR_RESOLVE_API_KEY}\"}" \ + >/dev/null 2>&1 \ + && echo "webhook-deploy: resolve-fixed-patterns applied" \ + || echo "webhook-deploy: WARN resolve-fixed-patterns failed (non-fatal)" + else + echo "webhook-deploy: WARN API not ready after 60s, skipping resolve-fixed-patterns" + fi + fi fi echo "webhook-deploy: done"