Add gateway replica events - #4212
Merged
Merged
Conversation
- Add the `gateway-replica` event target type. - Add the `target_gateway_replicas` and `within_gateways` filters to `/api/events/list`. - Add the new target type and filters to UI. - Add the `--within-gateway` filter to the `dstack event list` CLI command (`target_replicas`, however, does not have a counterpart in the CLI, consistent with `target_jobs` and `target_instances`). - Add event coverage for the gateway replica lifecycle: creation, status changes, service and service replica registration and unregistration. ```shell $ dstack event --within-gateway my-gateway [2026-08-25 22:56:11] [👤admin] [gateway my-gateway] Gateway created. Status: SUBMITTED [2026-08-25 22:56:14] [gateway my-gateway] Gateway status changed SUBMITTED -> PROVISIONING [2026-08-25 22:56:14] [gateway-replica my-gateway-0] Gateway replica created. Status: SUBMITTED [2026-08-25 22:56:14] [gateway-replica my-gateway-1] Gateway replica created. Status: SUBMITTED [2026-08-25 22:56:38] [gateway-replica my-gateway-0] Gateway replica status changed SUBMITTED -> PROVISIONING [2026-08-25 22:56:38] [gateway-replica my-gateway-1] Gateway replica status changed SUBMITTED -> PROVISIONING [2026-08-25 22:57:52] [gateway-replica my-gateway-1] Gateway replica status changed PROVISIONING -> RUNNING [2026-08-25 22:57:58] [gateway-replica my-gateway-0] Gateway replica status changed PROVISIONING -> RUNNING [2026-08-25 22:58:06] [gateway my-gateway] Gateway status changed PROVISIONING -> RUNNING [2026-08-25 22:58:25] [run my-service, gateway my-gateway] Service assigned to gateway [2026-08-25 22:58:26] [run my-service, gateway-replica my-gateway-1] Service registered [2026-08-25 22:58:28] [run my-service, gateway-replica my-gateway-0] Service registered [2026-08-25 23:01:33] [job my-service-0-0, gateway-replica my-gateway-1] Service replica registered [2026-08-25 23:01:33] [job my-service-0-0, gateway-replica my-gateway-0] Service replica registered [2026-08-25 23:02:32] [👤admin] [gateway my-gateway] Gateway updated. Changed fields: replicas [2026-08-25 23:02:42] [gateway-replica my-gateway-0] Gateway replica status changed RUNNING -> TERMINATING (Scaled in) [2026-08-25 23:02:58] [gateway-replica my-gateway-0] Gateway replica status changed TERMINATING -> TERMINATED ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gateway-replicaevent target type.target_gateway_replicasandwithin_gatewaysfilters to/api/events/list.--within-gatewayfilter to thedstack event listCLI command (target_replicas, however, does not have a counterpart in the CLI, consistent withtarget_jobsandtarget_instances).#3959