Skip to content

fix(FR-3303): keep chat endpoint visible while a new revision rolls out#8236

Open
agatha197 wants to merge 1 commit into
mainfrom
fr-3303
Open

fix(FR-3303): keep chat endpoint visible while a new revision rolls out#8236
agatha197 wants to merge 1 commit into
mainfrom
fr-3303

Conversation

@agatha197

@agatha197 agatha197 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Resolves #8235 (FR-3303)

Problem

In a model deployment, when a new revision is being applied and its inference session is still pending (e.g. resource-constrained), the previous revision's replica is still running and serving traffic — but the deployment disappears from the Playground Chat menu, so the user cannot chat against the still-alive replica.

Cause

The chat endpoint selector filtered endpoints with lifecycle_stage == "ready" | lifecycle_stage == "created", which only matches a completed deployment. While a new revision rolls out, the endpoint's lifecycle_stage moves to deploying/pending/scaling, so it was filtered out even though a replica was still serving.

Fix

Filter out only terminated endpoints (destroying / destroyed) instead of matching ready/created. A deployment whose replica is still serving stays selectable while a new revision rolls out.

  • ChatPage.tsx (useDefaultEndpointId) and EndpointSelect.tsx now use lifecycle_stage != "destroyed" & lifecycle_stage != "destroying".
  • The exclusion filter is backend-version agnostic (terminal stages exist in all versions), so the now-redundant endpoint-lifecycle-ready-stage feature-flag branching and the dead, always-overridden lifecycleStageFilter prop on EndpointSelect are removed.

Interim approach per the originating discussion. A follow-up (noted in a code TODO) should, once the endpoint connection supports nested filters, select deployments that have at least one replica with an active traffic status rather than relying on the endpoint-level lifecycle_stage.

Verification

bash scripts/verify.sh:

  • Relay: PASS
  • Lint: PASS
  • Format: PASS
  • TypeScript: 1 failure in src/components/FluentEmojiIcon.tsx:17 (CUSTOM_CDN_URL) — pre-existing on main, unrelated to this change (confirmed by re-running verify with the changes stashed). No new type errors in the touched files.

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings July 10, 2026 02:04
@github-actions github-actions Bot added the size:M 30~100 LoC label Jul 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Keeps chat endpoints selectable during revision rollouts by excluding only terminated deployments.

Changes:

  • Replaces ready/created allowlists with destroying/destroyed exclusions.
  • Removes obsolete version checks and the unused lifecycle filter prop.
  • Documents the future replica traffic-status filtering approach.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
react/src/pages/ChatPage.tsx Updates default endpoint filtering.
react/src/components/Chat/EndpointSelect.tsx Updates selector filtering and removes obsolete configuration.

@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for react-coverage (./react)

Status Category Percentage Covered / Total
🔵 Lines 6.92% 2021 / 29184
🔵 Statements 5.67% 2285 / 40280
🔵 Functions 5.81% 332 / 5705
🔵 Branches 3.76% 1433 / 38015
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react/src/components/Chat/EndpointSelect.tsx 0% 0% 0% 0% 56-261
react/src/pages/ChatPage.tsx 0% 0% 0% 0% 44-148
Generated in workflow #2711 for commit 22864a6 by the Vitest Coverage Report Action

The Playground chat endpoint selector filtered endpoints on
lifecycle_stage == "ready" | "created", which only matches a completed
deployment. While a new revision was rolling out (e.g. deploying/pending),
the endpoint dropped out of the chat menu even though a previous revision's
replica was still alive and serving traffic.

Filter out only terminated endpoints (destroying/destroyed) instead, so a
deployment whose replica is still serving stays selectable. This also drops
the now-unnecessary endpoint-lifecycle-ready-stage feature-flag branching
and the dead lifecycleStageFilter prop on EndpointSelect.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Copy link
Copy Markdown
Contributor Author

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30~100 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chat menu hides endpoint while a new revision is rolling out even though a prior revision's replica is alive

2 participants