From eaa000303765f1ffed2deddc40ba7dbfed88381f Mon Sep 17 00:00:00 2001 From: "denis.bilenko" Date: Thu, 12 Nov 2026 12:09:00 +0000 Subject: [PATCH] acceptance: alerts-v2-not-found: label lifecycle_state, name cloud differences Co-authored-by: Isaac --- acceptance/cmd/workspace/alerts-v2-not-found/output.txt | 4 +++- acceptance/cmd/workspace/alerts-v2-not-found/script | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/acceptance/cmd/workspace/alerts-v2-not-found/output.txt b/acceptance/cmd/workspace/alerts-v2-not-found/output.txt index 6b6109277a9..1258d818cd8 100644 --- a/acceptance/cmd/workspace/alerts-v2-not-found/output.txt +++ b/acceptance/cmd/workspace/alerts-v2-not-found/output.txt @@ -4,7 +4,9 @@ >>> [CLI] alerts-v2 trash-alert [ALERT_ID] >>> [CLI] alerts-v2 get-alert [ALERT_ID] -DELETED +{ + "lifecycle_state": "DELETED" +} >>> [CLI] alerts-v2 trash-alert [ALERT_ID] Error: Alert [ALERT_ID] is already trashed diff --git a/acceptance/cmd/workspace/alerts-v2-not-found/script b/acceptance/cmd/workspace/alerts-v2-not-found/script index ea778f0b349..48ebf5d2b77 100644 --- a/acceptance/cmd/workspace/alerts-v2-not-found/script +++ b/acceptance/cmd/workspace/alerts-v2-not-found/script @@ -1,6 +1,10 @@ # Alert get/update/trash responses for trashed, purged and unknown alerts. # Expected output was recorded against AWS on 2026-11-11; the test is local-only -# because the messages are backend-owned and have changed before. +# because the messages are backend-owned and have changed before. Two known +# differences on cloud, so Cloud = true would fail: +# - trash-alert on a trashed alert reports a different UUID than the alert id; +# - update-alert on a trashed alert names the file with a timestamp suffix +# (myalert-.dbalert.json), since trashing renames it. create_alert() { $CLI alerts-v2 create-alert --json '{"display_name": "'$1'", "query_text": "select 1", "warehouse_id": "w1", "evaluation": {"comparison_operator": "EQUAL", "source": {"name": "1"}, "threshold": {"value": {"double_value": 1}}}, "schedule": {"quartz_cron_schedule": "0 0 * * * ?", "timezone_id": "UTC"}}' | jq -r .id } @@ -10,7 +14,7 @@ add_repl "$alert_id" ALERT_ID title "trashed alert is still readable" trace $CLI alerts-v2 trash-alert $alert_id -trace $CLI alerts-v2 get-alert $alert_id | jq -r .lifecycle_state +trace $CLI alerts-v2 get-alert $alert_id | jq '{lifecycle_state}' errcode trace $CLI alerts-v2 trash-alert $alert_id errcode trace $CLI alerts-v2 update-alert $alert_id display_name --json '{"display_name": "x"}'