feat(FR-2898): improve SFTP session creation error feedback#7422
Open
yomybaby wants to merge 1 commit into
Open
feat(FR-2898): improve SFTP session creation error feedback#7422yomybaby wants to merge 1 commit into
yomybaby wants to merge 1 commit into
Conversation
Member
Author
How to use the Graphite Merge QueueAdd either label to this PR to merge it via 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. |
Contributor
Coverage Report for backend-ai-ui-coverage (./packages/backend.ai-ui)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves SFTP session creation failure feedback by showing a richer error dialog with detailed error metadata and a shortcut to the upload/system session list.
Changes:
- Adds detailed error formatting support to
useErrorMessageResolver. - Updates both SFTP server button components to show a confirm-style error modal with navigation.
- Replaces/removes older SFTP error translation keys and adds new English/Korean strings.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
react/src/components/SFTPServerButton.tsx |
Shows detailed SFTP session creation failure dialog with navigation action. |
react/src/components/SFTPServerButtonV2.tsx |
Mirrors the updated SFTP failure dialog behavior for V2. |
packages/backend.ai-ui/src/hooks/useErrorMessageResolver.ts |
Adds options-based API and detailed error message verbosity. |
resources/i18n/en.json |
Adds new English SFTP failure and navigation strings. |
resources/i18n/ko.json |
Adds new Korean SFTP failure and navigation strings. |
resources/i18n/de.json |
Removes old SFTP error strings. |
resources/i18n/el.json |
Removes old SFTP error strings. |
resources/i18n/es.json |
Removes old SFTP error strings. |
resources/i18n/fi.json |
Removes old SFTP error strings. |
resources/i18n/fr.json |
Removes old SFTP error strings. |
resources/i18n/id.json |
Removes old SFTP error strings. |
resources/i18n/it.json |
Removes old SFTP error strings. |
resources/i18n/ja.json |
Removes old SFTP error strings. |
resources/i18n/mn.json |
Removes old SFTP error strings. |
resources/i18n/ms.json |
Removes old SFTP error strings. |
resources/i18n/pl.json |
Removes old SFTP error strings. |
resources/i18n/pt-BR.json |
Removes old SFTP error strings. |
resources/i18n/pt.json |
Removes old SFTP error strings. |
resources/i18n/ru.json |
Removes old SFTP error strings. |
resources/i18n/th.json |
Removes old SFTP error strings. |
resources/i18n/tr.json |
Removes old SFTP error strings. |
resources/i18n/vi.json |
Removes old SFTP error strings. |
resources/i18n/zh-CN.json |
Removes old SFTP error strings. |
resources/i18n/zh-TW.json |
Removes old SFTP error strings. |
Contributor
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||
808fb10 to
09c0465
Compare
09c0465 to
f189f8f
Compare
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.

Resolves #7421(FR-2898)
Summary
Improves the SFTP session creation failure UX so the modal carries enough signal for operators (and to triage VoC tickets) to distinguish a quota / policy denial from agent / storage failures. Reported on two customer sites where the misleading "upload session limit reached" message caused multi-hour debugging detours.
Background
When SFTP session creation fails, WebUI currently shows the backend-supplied message — frequently "생성 가능한 업로드 세션 개수 한도에 도달했습니다" — regardless of the actual cause:
max_concurrent_sftp_sessions=5, actual usage 1. Real cause: agent port-pool exhaustion (123 exited SFTP containers piled up). Manager logs showedSessionEnqueuedEvent → SessionCancelledEvent(reason=FAILED_TO_START)but the modal said "limit reached".max_concurrent_sftp_session=3, actual usage 0. Real cause: bad cert-mount option inagent-docker-container-opts.jsonpreventing container creation. Modal still said "limit reached".Changes
useErrorMessageResolver— add averbosity: 'detail'option (packages/backend.ai-ui/src/hooks/useErrorMessageResolver.ts). In detail mode, the resolver prefixes the message with the HTTP status code and backenderror_code— e.g.[HTTP 500] [BAI_E0001] <message>— so operators can distinguish a 4xx policy/quota response from a 5xx agent/storage failure without server-side digging. Backwards compatible: existing callers (getErrorMessage(error),getErrorMessage(error, 'fallback')) keep their current output.SFTP error modal — classification + recovery CTA (
react/src/components/SFTPServerButton.tsx,SFTPServerButtonV2.tsx). The error path now opens amodal.confirmwith the resolved detail-verbosity message, a hint that lingering upload sessions may be the underlying cause, and a primary action that deep-links to the upload session list (/session?type=system) so users can clean up stale sessions themselves. The secondary action just closes.Remove orphan i18n keys.
data.explorer.NumberOfSFTPSessionsExceededTitle,NumberOfSFTPSessionsExceededBody, andSFTPSessionNotAvailableexist across 21 locale files but have no consumer anywhere in the current React/TS source tree. They were a legacy Polymer leftover; the actual text users see comes through the backend response. Removed across all locales. New keys added inen.jsonandko.json; remaining 19 locales will be filled by the i18n agent.Test plan
bash scripts/verify.sh— Relay / Lint / Format pass. The remaining TypeScript failures (SessionLauncherPage,StorageHostSettingPage,UserCredentialsPage, etc.) are pre-existing onmainand untouched by this PR; confirmed bygit stash+rerun.mount-in-session):[HTTP <code>] [<error_code>] <message>when codes are present; falls back gracefully when absent./session?type=system.grep -rn "NumberOfSFTPSessionsExceeded\|SFTPSessionNotAvailable" resources/i18n/returns nothing.Out of scope
Related