Add external facing gql-ws for agent websockets#3438
Conversation
Greptile SummaryThis PR introduces an external-facing The only notable concern is that Confidence Score: 5/5Safe to merge — the only finding is a P2 concern about an overly broad prefix match that may or may not be intentional. Auth is correctly enforced via deploy token and cluster context. The new socket, schema subscription, and broadcast integration all follow existing patterns faithfully. The one open question (service.manifests matching) is a logic style issue that doesn't break the primary use case. lib/console/deployments/pubsub/consumers/broadcast.ex — verify whether service.manifests events should be forwarded as :service notifications.
|
| Filename | Overview |
|---|---|
| lib/console/deployments/pubsub/consumers/broadcast.ex | Adds do_gql_broadcast to fan out cluster room events to Absinthe subscriptions; event_to_resource pattern could unintentionally forward service.manifests events as :service notifications. |
| lib/console/external_graphql.ex | Adds subscription block importing public_deployment_subscriptions to the external-facing GraphQL schema. |
| lib/console/graphql/deployments.ex | Adds agent_notification_resource enum, deploy_agent_notification object, and public_deployment_subscriptions with cluster-auth config; types and auth logic look correct. |
| lib/console_web/channels/graphqlws_socket.ex | Adds ExternalGraphqlWSSocket authenticated via deploy token; mirrors existing GraphqlWSSocket pattern correctly. |
| lib/console_web/endpoint.ex | Registers the new ExternalGraphqlWSSocket at /ext/socket/gql-ws with graphql-transport-ws subprotocol; no path conflict with existing /ext/socket route. |
Reviews (1): Last reviewed commit: "Add external facing gql-ws for agent web..." | Re-trigger Greptile
This has a more stable, usable websocket client (hopefully), so should be a better solve for delivering these pushes into our agents
1339c9e to
7b8349c
Compare
7e9e5ea to
7f8a853
Compare
10a713e to
e1d43b3
Compare
This has a more stable, usable websocket client (hopefully), so should be a better solve for delivering these pushes into our agents
Fixes PROD-4699 PROD-4700
Test Plan
unit test
Checklist
Plural Flow: console