fix: Use environment-specific log API endpoints for Cloud and OSS#6539
fix: Use environment-specific log API endpoints for Cloud and OSS#6539christian-byrne merged 1 commit intomainfrom
Conversation
- Cloud 환경에서는 /api/logs/* 엔드포인트 사용 - OSS 환경에서는 /internal/logs/* 엔드포인트 사용 - getLogs(), getRawLogs(), subscribeLogs() 메서드에 환경별 URL 분기 로직 추가 이 수정으로 Cloud 환경에서 발생하던 401 인증 에러가 해결됩니다. Cloud 백엔드는 /api/logs/* 경로로 public API를 제공하는 반면, OSS는 /internal/logs/* 경로를 사용하기 때문입니다.
🎭 Playwright Test Results⏰ Completed at: 11/02/2025, 09:25:19 AM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 11/02/2025, 09:10:17 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.27 MB (baseline 3.27 MB) • 🔴 +63 BMain entry bundles and manifests
Status: 3 added / 3 removed Graph Workspace — 724 kB (baseline 724 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 — 295 kB (baseline 295 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 6 added / 6 removed UI Components — 12.3 kB (baseline 12.3 kB) • ⚪ 0 BReusable component library chunks
Status: 1 added / 1 removed Data & Services — 11.4 kB (baseline 11.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
|
) ## Problem 401 authentication errors were persistently occurring when calling log-related APIs in the Cloud environment. ## Root Cause - Frontend was calling `/internal/logs/*` endpoints in all environments - Cloud backend provides public APIs at `/api/logs/*` (no authentication required) - OSS (open source) backend uses `/internal/logs/*` paths - This caused Cloud to call non-existent paths → resulting in 401 errors ## Solution Modified to use appropriate API endpoints based on environment using the `isCloud` flag: - Cloud environment: Use `/api/logs/*` - OSS environment: Use `/internal/logs/*` ## Changes - `getLogs()`: Added environment-specific URL branching - `getRawLogs()`: Added environment-specific URL branching - `subscribeLogs()`: Added environment-specific URL branching ## Testing - [x] Verified log functionality works correctly in local (OSS) environment - [x] Confirmed 401 errors are resolved in Cloud environment ## Related Issues This resolves the 401 errors tracked in Sentry for log API endpoints. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6539-fix-Use-environment-specific-log-API-endpoints-for-Cloud-and-OSS-29f6d73d365081da9e77f8b55556ca81) by [Unito](https://www.unito.io)
|
@viva-jinyi Successfully backported to #6544 |
…r Cloud and OSS (#6544) Backport of #6539 to `rh-test` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6544-backport-rh-test-fix-Use-environment-specific-log-API-endpoints-for-Cloud-and-OSS-29f6d73d365081dc9dd7d95805242774) by [Unito](https://www.unito.io) --------- Co-authored-by: Jin Yi <jin12cc@gmail.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Problem
401 authentication errors were persistently occurring when calling log-related APIs in the Cloud environment.
Root Cause
/internal/logs/*endpoints in all environments/api/logs/*(no authentication required)/internal/logs/*pathsSolution
Modified to use appropriate API endpoints based on environment using the
isCloudflag:/api/logs/*/internal/logs/*Changes
getLogs(): Added environment-specific URL branchinggetRawLogs(): Added environment-specific URL branchingsubscribeLogs(): Added environment-specific URL branchingTesting
Related Issues
This resolves the 401 errors tracked in Sentry for log API endpoints.
┆Issue is synchronized with this Notion page by Unito