The listener should subscribe to the Taskcluster build failure exchange, filter the desired messages, and trigger the Hackbot API.
It should live outside the Hackbot API as a separate service, as it has a different lifecycle and scalability.
Initially, it will trigger the build repair agent, but later on it can also handle test failures, intermittent failures, etc.
Notification about the results will not be a part of this service. It will live either in the API itself or in a separate service, as discussed with @suhaibmujahid. If we wanted to include the notifications here, the service would need to poll the API to wait for the job completion (as it was implemented in a draft prototype PR).
The listener should subscribe to the Taskcluster build failure exchange, filter the desired messages, and trigger the Hackbot API.
It should live outside the Hackbot API as a separate service, as it has a different lifecycle and scalability.
Initially, it will trigger the build repair agent, but later on it can also handle test failures, intermittent failures, etc.
Notification about the results will not be a part of this service. It will live either in the API itself or in a separate service, as discussed with @suhaibmujahid. If we wanted to include the notifications here, the service would need to poll the API to wait for the job completion (as it was implemented in a draft prototype PR).