-
Notifications
You must be signed in to change notification settings - Fork 400
Fix cloud routing issues caused by incorrect api_base calculation #6572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 11/04/2025, 12:23:07 PM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Test Results⏰ Completed at: 11/04/2025, 12:35:18 PM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.28 MB (baseline 3.28 MB) • 🔴 +45 BMain entry bundles and manifests
Status: 3 added / 3 removed Graph Workspace — 728 kB (baseline 728 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 8.18 kB (baseline 8.18 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 1 added / 1 removed Panels & Settings — 293 kB (baseline 293 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 6 added / 6 removed UI Components — 12.6 kB (baseline 12.6 kB) • ⚪ 0 BReusable component library chunks
Status: 1 added / 1 removed Data & Services — 10.4 kB (baseline 10.4 kB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 1 added / 1 removed Utilities & Hooks — 1.07 kB (baseline 1.07 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Vendor & Third-Party — 5.32 MB (baseline 5.32 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 2.55 MB (baseline 2.55 MB) • ⚪ 0 BBundles that do not match a named category
|
) ## Summary - Resolves multiple cloud environment issues when accessing `/cloud/user-check` directly - Fixes API routing problems that caused 304 Not Modified errors and JSON parsing failures - Maintains compatibility with subpath deployments for OSS users ## Root Cause The `api_base` was incorrectly calculated as `/cloud` on cloud SPA routes, causing API calls to use wrong paths like `/cloud/api/user` instead of `/api/user`. ## Issues Fixed - ❌ `/cloud/user-check` direct access resulted in infinite loading - ❌ JSON parsing errors: `Unexpected token '<', "<!DOCTYPE "... is not valid JSON` - ❌ 304 Not Modified responses on `/cloud/api/user`, `/cloud/api/settings/onboarding_survey`, `/cloud/api/system_stats` ## Solution Added conditional `api_base` calculation in `ComfyApi` constructor: - **Cloud SPA routes** (`/cloud/*`): Use empty `api_base` → API calls use `/api/*` paths - **Regular deployments**: Keep existing logic → Supports subpath deployments ## Test Plan - [x] Verify `/cloud/user-check` direct access works without infinite loading - [x] Verify all API calls return 200 instead of 304 - [x] Verify OSS subpath deployment compatibility unchanged - [x] Test authentication flow completion 🤖 Generated with [Claude Code](https://claude.ai/code) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6572-Fix-cloud-routing-issues-caused-by-incorrect-api_base-calculation-2a16d73d36508163aeb2cbf6347b427d) by [Unito](https://www.unito.io)
|
@viva-jinyi Successfully backported to #6578 |
) ## Summary - Resolves multiple cloud environment issues when accessing `/cloud/user-check` directly - Fixes API routing problems that caused 304 Not Modified errors and JSON parsing failures - Maintains compatibility with subpath deployments for OSS users ## Root Cause The `api_base` was incorrectly calculated as `/cloud` on cloud SPA routes, causing API calls to use wrong paths like `/cloud/api/user` instead of `/api/user`. ## Issues Fixed - ❌ `/cloud/user-check` direct access resulted in infinite loading - ❌ JSON parsing errors: `Unexpected token '<', "<!DOCTYPE "... is not valid JSON` - ❌ 304 Not Modified responses on `/cloud/api/user`, `/cloud/api/settings/onboarding_survey`, `/cloud/api/system_stats` ## Solution Added conditional `api_base` calculation in `ComfyApi` constructor: - **Cloud SPA routes** (`/cloud/*`): Use empty `api_base` → API calls use `/api/*` paths - **Regular deployments**: Keep existing logic → Supports subpath deployments ## Test Plan - [x] Verify `/cloud/user-check` direct access works without infinite loading - [x] Verify all API calls return 200 instead of 304 - [x] Verify OSS subpath deployment compatibility unchanged - [x] Test authentication flow completion 🤖 Generated with [Claude Code](https://claude.ai/code) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6572-Fix-cloud-routing-issues-caused-by-incorrect-api_base-calculation-2a16d73d36508163aeb2cbf6347b427d) by [Unito](https://www.unito.io)
…ase calculation (#6578) Backport of #6572 to `rh-test` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6578-backport-rh-test-Fix-cloud-routing-issues-caused-by-incorrect-api_base-calculation-2a16d73d36508157a3edfca38af1cf03) by [Unito](https://www.unito.io) Co-authored-by: Jin Yi <[email protected]>
Summary
/cloud/user-checkdirectlyRoot Cause
The
api_basewas incorrectly calculated as/cloudon cloud SPA routes, causing API calls to use wrong paths like/cloud/api/userinstead of/api/user.Issues Fixed
/cloud/user-checkdirect access resulted in infinite loadingUnexpected token '<', "<!DOCTYPE "... is not valid JSON/cloud/api/user,/cloud/api/settings/onboarding_survey,/cloud/api/system_statsSolution
Added conditional
api_basecalculation inComfyApiconstructor:/cloud/*): Use emptyapi_base→ API calls use/api/*pathsTest Plan
/cloud/user-checkdirect access works without infinite loading🤖 Generated with Claude Code
┆Issue is synchronized with this Notion page by Unito