Background
Follow-up to FR-3303. That bug fixed the Playground Chat endpoint selector hiding a deployment while a new revision rolls out (a prior revision's replica is still serving). The interim fix filters the legacy endpoint_list connection by endpoint-level lifecycle_stage (lifecycle_stage != "destroyed" & lifecycle_stage != "destroying"), which is a proxy signal — it keeps non-terminated deployments visible but does not truly check whether a replica is serving traffic.
Per the originating discussion, the clean signal is the replica traffic status: a deployment should be chat-selectable when it has at least one replica whose traffic status is ACTIVE. This was blocked on the endpoint/deployment connection lacking nested filters.
That backend capability is now available: backend.ai #12805 (BA-6849) "support nested replica deployment filters" (manager 26.8.0). It adds DeploymentFilter.replicas: ReplicaNestedFilter { some | every | none: ReplicaFilter }, and ReplicaFilter.trafficStatus: TrafficStatusFilter with enum TrafficStatus { ACTIVE, INACTIVE }.
Goal
Replace the interim lifecycle_stage-based filtering in the Chat endpoint selection with the nested replica traffic-status filter, so a deployment is selectable precisely when a replica is actively serving.
Target filter (on the myDeployments connection):
filter: { replicas: { some: { trafficStatus: { equals: ACTIVE } } } }
Scope
react/src/pages/ChatPage.tsx — useDefaultEndpointId (currently queries endpoint_list with a string lifecycle_stage filter).
react/src/components/Chat/EndpointSelect.tsx — the Chat endpoint dropdown (currently queries endpoint_list with a string lifecycle_stage filter).
Both carry a TODO(FR-3303) marker pointing at this work.
Implementation notes
- The nested
replicas filter lives on the structured DeploymentFilter input of the deployments connections (myDeployments / projectDeployments / adminDeployments), not on the legacy endpoint_list string-filter field. So this requires migrating the two Chat queries from endpoint_list to myDeployments (user-scoped), following the existing BAIDeploymentSelect / DeploymentListPage patterns.
DeploymentFilter.replicas ships in manager 26.8.0, so it must be version-gated (isManagerVersionCompatibleWith('26.8.0')). On older managers, fall back to the interim behavior (exclude terminated deployments) so nothing regresses.
- Requires syncing
data/schema.graphql to include input ReplicaNestedFilter and DeploymentFilter.replicas, then pnpm relay.
Verification
bash scripts/verify.sh (Relay + Lint + Format + TypeScript).
- Live verification against a
26.8.0 manager is pending the manager release; until then the change ships behind the version gate.
JIRA Issue: FR-3332
Background
Follow-up to FR-3303. That bug fixed the Playground Chat endpoint selector hiding a deployment while a new revision rolls out (a prior revision's replica is still serving). The interim fix filters the legacy
endpoint_listconnection by endpoint-levellifecycle_stage(lifecycle_stage != "destroyed" & lifecycle_stage != "destroying"), which is a proxy signal — it keeps non-terminated deployments visible but does not truly check whether a replica is serving traffic.Per the originating discussion, the clean signal is the replica traffic status: a deployment should be chat-selectable when it has at least one replica whose traffic status is
ACTIVE. This was blocked on the endpoint/deployment connection lacking nested filters.That backend capability is now available: backend.ai #12805 (BA-6849) "support nested replica deployment filters" (manager
26.8.0). It addsDeploymentFilter.replicas: ReplicaNestedFilter { some | every | none: ReplicaFilter}, andReplicaFilter.trafficStatus: TrafficStatusFilterwith enumTrafficStatus { ACTIVE, INACTIVE}.Goal
Replace the interim
lifecycle_stage-based filtering in the Chat endpoint selection with the nested replica traffic-status filter, so a deployment is selectable precisely when a replica is actively serving.Target filter (on the
myDeploymentsconnection):Scope
react/src/pages/ChatPage.tsx—useDefaultEndpointId(currently queriesendpoint_listwith a stringlifecycle_stagefilter).react/src/components/Chat/EndpointSelect.tsx— the Chat endpoint dropdown (currently queriesendpoint_listwith a stringlifecycle_stagefilter).Both carry a
TODO(FR-3303)marker pointing at this work.Implementation notes
replicasfilter lives on the structuredDeploymentFilterinput of thedeploymentsconnections (myDeployments/projectDeployments/adminDeployments), not on the legacyendpoint_liststring-filter field. So this requires migrating the two Chat queries fromendpoint_listtomyDeployments(user-scoped), following the existingBAIDeploymentSelect/DeploymentListPagepatterns.DeploymentFilter.replicasships in manager26.8.0, so it must be version-gated (isManagerVersionCompatibleWith('26.8.0')). On older managers, fall back to the interim behavior (exclude terminated deployments) so nothing regresses.data/schema.graphqlto includeinput ReplicaNestedFilterandDeploymentFilter.replicas, thenpnpm relay.Verification
bash scripts/verify.sh(Relay + Lint + Format + TypeScript).26.8.0manager is pending the manager release; until then the change ships behind the version gate.JIRA Issue: FR-3332