Repository navigation
testserver: match cloud responses for trashed, purged and unknown alerts #7509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Cloud = false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
|
|
||
| === trashed alert is still readable | ||
|
|
||
| >>> [CLI] alerts-v2 trash-alert [ALERT_ID] | ||
|
|
||
| >>> [CLI] alerts-v2 get-alert [ALERT_ID] | ||
| DELETED | ||
|
|
||
| >>> [CLI] alerts-v2 trash-alert [ALERT_ID] | ||
| Error: Alert [ALERT_ID] is already trashed | ||
|
|
||
| Exit code: 1 | ||
|
|
||
| >>> [CLI] alerts-v2 update-alert [ALERT_ID] display_name --json {"display_name": "x"} | ||
| Error: Cannot move node 'myalert.dbalert.json' (ID: [ALERT_ID]) because it is in trash folder | ||
|
|
||
| Exit code: 1 | ||
|
|
||
| === purged alert is gone | ||
|
|
||
| >>> [CLI] alerts-v2 trash-alert [ALERT_ID] --purge | ||
|
|
||
| >>> [CLI] alerts-v2 get-alert [ALERT_ID] | ||
| Error: Tree node with id [ALERT_ID] does not exist | ||
|
|
||
| Exit code: 1 | ||
|
|
||
| >>> [CLI] alerts-v2 trash-alert [ALERT_ID] | ||
| Error: Tree node with id [ALERT_ID] does not exist | ||
|
|
||
| Exit code: 1 | ||
|
|
||
| >>> [CLI] alerts-v2 update-alert [ALERT_ID] display_name --json {"display_name": "x"} | ||
| Error: Tree node with id [ALERT_ID] does not exist | ||
|
|
||
| Exit code: 1 | ||
|
|
||
| === unknown alert | ||
|
|
||
| >>> [CLI] alerts-v2 get-alert [UUID] | ||
| Error: Alert with id [UUID] not found or has no folder node internal name | ||
|
|
||
| Exit code: 1 | ||
|
|
||
| >>> [CLI] alerts-v2 trash-alert [UUID] | ||
| Error: Alert with id [UUID] not found | ||
|
|
||
| Exit code: 1 | ||
|
|
||
| >>> [CLI] alerts-v2 update-alert [UUID] display_name --json {"display_name": "x"} | ||
| Error: Alert with id [UUID] not found or has no folder node internal name | ||
|
|
||
| Exit code: 1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # 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. | ||
| 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 | ||
| } | ||
|
|
||
| alert_id=$(create_alert myalert) | ||
| 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The golden shows a bare
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. #7546 switches it to AI agent (harness_auto, isaac_claude, opus5.5) |
||
| errcode trace $CLI alerts-v2 trash-alert $alert_id | ||
| errcode trace $CLI alerts-v2 update-alert $alert_id display_name --json '{"display_name": "x"}' | ||
|
|
||
| title "purged alert is gone" | ||
| trace $CLI alerts-v2 trash-alert $alert_id --purge | ||
| errcode trace $CLI alerts-v2 get-alert $alert_id | ||
| errcode trace $CLI alerts-v2 trash-alert $alert_id | ||
| errcode trace $CLI alerts-v2 update-alert $alert_id display_name --json '{"display_name": "x"}' | ||
|
|
||
| title "unknown alert" | ||
| unknown_id=00000000-0000-0000-0000-000000000000 | ||
| errcode trace $CLI alerts-v2 get-alert $unknown_id | ||
| errcode trace $CLI alerts-v2 trash-alert $unknown_id | ||
| errcode trace $CLI alerts-v2 update-alert $unknown_id display_name --json '{"display_name": "x"}' | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Against the cloud the output differs in two known places (trash-again UUID, timestamp suffix on the file name); can this comment name them so nobody flips
Cloud = trueblind?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in #7546. The header comment now lists both differences: trash-again reports a different UUID, and update on a trashed alert names the file
myalert-<timestamp>.dbalert.json.AI agent (harness_auto, isaac_claude, opus5.5)