Switch ATVM watcher status posts to MS Teams

This commit is contained in:
Anthony Wen
2026-07-27 19:07:50 -04:00
parent 67886174b3
commit 063d13d01a
8 changed files with 107 additions and 90 deletions
+10 -10
View File
@@ -7,11 +7,11 @@ This folder contains a per-run ATVM watcher service package that is intended to
Watch an ATVM automation request until it reaches a terminal state, then:
- for non-categorized runs:
- post one final status to Mattermost if the run state is `COMPLETED` or `FAILED`
- post one final status to MS Teams if the run state is `COMPLETED` or `FAILED`
- for categorized runs:
- detect each sequential categorized sub-run
- post one final status per completed categorized sub-run if that grouped run state is `COMPLETED` or `FAILED`
- verify each Mattermost post succeeded
- verify each MS Teams post succeeded
- write durable watcher state
- exit cleanly so the service stops
@@ -65,8 +65,8 @@ Typical workflow:
5. For non-categorized runs, when the run reaches a terminal state:
- `COMPLETED` or `FAILED`
- build the final ATVM status
- send the status to Mattermost
- verify Mattermost returned `ok`
- send the status to MS Teams
- verify the MS Teams workflow webhook returned HTTP 2xx, typically `202 Accepted`
- mark the run as posted
- exit
- `CANCELLED`, `TERMINATED`, `HUNG`, or `UNKNOWN`
@@ -74,9 +74,9 @@ Typical workflow:
- mark the final state
- exit
6. For categorized runs:
- detect each grouped sub-run in sequence from the parent run log
- wait for that grouped sub-run to finish
- send one Mattermost post for that grouped sub-run if it reached `COMPLETED` or `FAILED`
- detect each grouped sub-run in sequence from the parent run log
- wait for that grouped sub-run to finish
- send one MS Teams post for that grouped sub-run if it reached `COMPLETED` or `FAILED`
- keep the watcher alive while the parent categorized runner or related child Cypress process is still active
- do not treat one completed grouped sub-run as proof that the whole parent request is finished
- continue to the next grouped sub-run
@@ -86,8 +86,8 @@ Typical workflow:
The service expects the local credentials file values to be made available on the controller through the service environment:
- `MATTERMOST_ATVM_WEBHOOK`
- `MATTERMOST_ATVM_CHANNEL`
- `MS_TEAMS_ATVM_WEBHOOK`
- `MS_TEAMS_ATVM_CHANNEL`
Optional metadata for better status formatting:
@@ -168,7 +168,7 @@ The helper also:
./cancel-atvm-run-watcher.sh --build-name e2e-redhat9.6-ubuntu24.04-w2k25-fc
```
This writes a cancellation marker, updates `state.json` to `CANCELLED`, and stops the watcher instance. The watcher will not send Mattermost results for that run.
This writes a cancellation marker, updates `state.json` to `CANCELLED`, and stops the watcher instance. The watcher will not send MS Teams results for that run.
Runner cancel example: