Commit Graph
36 Commits
Author SHA1 Message Date
GareArc ef7918764b fix: remove duplicate import line 2026-03-11 18:44:43 -07:00
GareArc da06f738f7 fix: remove timeout parameter that doesn't exist in this branch config 2026-03-11 18:26:56 -07:00
GareArc 248504acef fix: remove invalid raise_for_status parameter from send_request call 2026-03-11 18:23:43 -07:00
GareArc 64fcd9859f fix: move exempt prefixes to module-level constant and refactor license status caching
- Move console_exempt_prefixes to module-level _CONSOLE_EXEMPT_PREFIXES
  to avoid per-request tuple construction in before_request handler
- Refactor get_cached_license_status into focused helper methods
  (_read_cached_license_status, _fetch_and_cache_license_status) to
  reduce try/except nesting
- Add exc_info=True to debug-level exception logs for diagnosability
- Add LicenseStatus return type annotation with TYPE_CHECKING guard
2026-03-11 14:08:12 -07:00
GareArc 9a682f1009 fix: use LicenseStatus enum instead of raw strings and tighten path prefix matching
Replace raw license status strings with LicenseStatus enum values in
app_factory.py and enterprise_service.py to prevent silent mismatches.
Use trailing-slash prefixes ('/console/api/', '/api/') to avoid false
matches on unrelated paths like /api-docs.
2026-03-05 01:16:45 -08:00
GareArc 858ccd8746 feat: add Redis caching for enterprise license status
Cache license status for 10 minutes to reduce HTTP calls to enterprise API.
Only caches license status, not full system features.

Changes:
- Add EnterpriseService.get_cached_license_status() method
- Cache key: enterprise:license:status
- TTL: 600 seconds (10 minutes)
- Graceful degradation: falls back to API call if Redis fails

Performance improvement:
- Before: HTTP call (~50-200ms) on every API request
- After: Redis lookup (~1ms) on cached requests
- Reduces load on enterprise service by ~99%
2026-03-04 21:28:11 -08:00
GareArc 2b739b9544 fix: handle enterprise API errors properly to prevent KeyError crashes
When enterprise API returns 403/404, the response contains error JSON
instead of expected data structure. Code was accessing fields directly
causing KeyError → 500 Internal Server Error.

Changes:
- Add enterprise-specific error classes (EnterpriseAPIError, etc.)
- Implement centralized error validation in EnterpriseRequest.send_request()
- Extract error messages from API responses (message/error/detail fields)
- Raise domain-specific errors based on HTTP status codes
- Preserve backward compatibility with raise_for_status parameter

This prevents KeyError crashes and returns proper HTTP error codes
(403/404) instead of 500 errors.
2026-03-04 19:53:43 -08:00
GareArc 7ef139cadd Squash merge 1.12.1-otel-ee into release/e-1.12.1 2026-03-04 16:59:37 -08:00
L1nSn0wandYunlu Wen 58524fd7fd feat(enterprise): auto-join newly registered accounts to the default workspace (#32308)
Co-authored-by: Yunlu Wen <[email protected]>
2026-03-02 16:38:43 +08:00
Xiyuan ChenandGitHub e9a7e8f77f fix: include sso_verified in access_mode validation (#32325) 2026-02-13 23:40:37 -08:00
GareArcandNFish d1f10ff301 feat: add redis mq for account deletion cleanup 2026-02-06 13:31:50 +08:00
Xiyuan ChenandGitHub 72ce6ca437 feat: implement workspace permission checks for member invitations an… (#31202) 2026-01-18 19:35:50 -08:00
Xiyuan ChenandGitHub 772ff636ec feat: credential sync fix for enterprise edition (#30626) 2026-01-14 23:33:24 -08:00
Yunlu WenGitHubautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
a129e684cc feat: inject traceparent in enterprise api (#30895)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-13 23:37:39 +09:00
Xiyuan ChenandGitHub 6044f0666a fix: use query param for delete method (#30206) 2025-12-26 00:34:35 -08:00
Xiyuan ChenandGitHub f260627660 feat: use id for webapp (#27576) 2025-10-29 01:45:40 -07:00
+24
-LAN-GitHubCopilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>Yunlu WenJoelGareArcNFishDavide Delbiancominglu7Pondercrazywoolagemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>heysztAsuka MinatoGuangdong LiuEric GuoNeatGuyCodingXlKsytDhruv Gorasiyacrazywoolagithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>lyzno1hj24GuanMu非法操作CopilotTonloYusuke YamadaNovicekenwoodjwAdemílson Tonatoznnyangzheli
9a5f214623 refactor: replace localStorage with HTTP-only cookies for auth tokens (#24365)
Signed-off-by: NeatGuyCoding <[email protected]>
Signed-off-by: lyzno1 <[email protected]>
Signed-off-by: kenwoodjw <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Yunlu Wen <[email protected]>
Co-authored-by: Joel <[email protected]>
Co-authored-by: GareArc <[email protected]>
Co-authored-by: NFish <[email protected]>
Co-authored-by: Davide Delbianco <[email protected]>
Co-authored-by: minglu7 <[email protected]>
Co-authored-by: Ponder <[email protected]>
Co-authored-by: crazywoola <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: heyszt <[email protected]>
Co-authored-by: Asuka Minato <[email protected]>
Co-authored-by: Guangdong Liu <[email protected]>
Co-authored-by: Eric Guo <[email protected]>
Co-authored-by: NeatGuyCoding <[email protected]>
Co-authored-by: XlKsyt <[email protected]>
Co-authored-by: Dhruv Gorasiya <[email protected]>
Co-authored-by: crazywoola <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: lyzno1 <[email protected]>
Co-authored-by: hj24 <[email protected]>
Co-authored-by: GuanMu <[email protected]>
Co-authored-by: 非法操作 <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Tonlo <[email protected]>
Co-authored-by: Yusuke Yamada <[email protected]>
Co-authored-by: Novice <[email protected]>
Co-authored-by: kenwoodjw <[email protected]>
Co-authored-by: Ademílson Tonato <[email protected]>
Co-authored-by: znn <[email protected]>
Co-authored-by: yangzheli <[email protected]>
2025-10-19 21:29:04 +08:00
Asuka MinatoGitHubautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>crazywoola
bb6a331490 change all to httpx (#26119)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: crazywoola <[email protected]>
2025-10-10 23:41:16 +08:00
Asuka MinatoGitHubautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>Copilotgemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>crazywoola
ab2eacb6c1 use model_validate (#26182)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: crazywoola <[email protected]>
2025-10-10 17:30:13 +09:00
+10
-LAN-GitHubtwwucrazywoolajyongWu TianweiQuantumGhostlyzno1quicksandJyonglyzno1zxhlyhYongtao Huangautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>JoelCopilotnite-kniteHanqing Zhaogemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>Harry
85cda47c70 feat: knowledge pipeline (#25360)
Signed-off-by: -LAN- <[email protected]>
Co-authored-by: twwu <[email protected]>
Co-authored-by: crazywoola <[email protected]>
Co-authored-by: jyong <[email protected]>
Co-authored-by: Wu Tianwei <[email protected]>
Co-authored-by: QuantumGhost <[email protected]>
Co-authored-by: lyzno1 <[email protected]>
Co-authored-by: quicksand <[email protected]>
Co-authored-by: Jyong <[email protected]>
Co-authored-by: lyzno1 <[email protected]>
Co-authored-by: zxhlyh <[email protected]>
Co-authored-by: Yongtao Huang <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Joel <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: nite-knite <[email protected]>
Co-authored-by: Hanqing Zhao <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Harry <[email protected]>
2025-09-18 12:49:10 +08:00
Garfield DaiGitHubzxhlyhGareArcautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>hjlarry
88d5e27fe8 Release/e-1.8.1 (#25613)
Co-authored-by: zxhlyh <[email protected]>
Co-authored-by: GareArc <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: hjlarry <[email protected]>
2025-09-15 14:49:23 +08:00
Asuka MinatoGitHubautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
38057b1b0e add typing to all wraps (#25405)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-09 16:48:33 +08:00
Xiyuan ChenGitHubCopilotautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
64c9a2f678 Feat/credential policy (#25151)
Co-authored-by: Copilot <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-08 23:45:05 -07:00
Xiyuan ChenGitHubautofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
cfefe4f738 Feat: Education (#24208)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-08-20 15:38:14 +08:00
Xiyuan ChenandGitHub 904af20023 Feat/webapp opt (#23283) 2025-08-05 16:07:48 +08:00
Bowen LiangandGitHub e7388779a1 chore: bump ruff to 0.12.x (#22259) 2025-07-12 20:00:54 +08:00
Xiyuan ChenandGitHub 0720bc7408 Feat/webapp verified sso main (#20494) 2025-06-09 17:19:53 +09:00
+8 d186daa131 E-300 (#19726)
Signed-off-by: -LAN- <[email protected]>
Co-authored-by: Hash Brown <[email protected]>
Co-authored-by: crazywoola <[email protected]>
Co-authored-by: GareArc <[email protected]>
Co-authored-by: Byron.wang <[email protected]>
Co-authored-by: Joel <[email protected]>
Co-authored-by: -LAN- <[email protected]>
Co-authored-by: Garfield Dai <[email protected]>
Co-authored-by: KVOJJJin <[email protected]>
Co-authored-by: Alexi.F <[email protected]>
Co-authored-by: Xiyuan Chen <[email protected]>
Co-authored-by: kautsar_masuara <[email protected]>
Co-authored-by: achmad-kautsar <[email protected]>
Co-authored-by: Xin Zhang <[email protected]>
Co-authored-by: kelvintsim <[email protected]>
Co-authored-by: zxhlyh <[email protected]>
Co-authored-by: Zixuan Cheng <[email protected]>
2025-05-20 12:07:50 +08:00
yihongandGitHub 56e15d09a9 feat: mypy for all type check (#10921) 2024-12-24 18:38:51 +08:00
JoeandGitHub bc43efba75 fix: remove url join (#9635) 2024-10-22 15:56:53 +08:00
Byron.wangandGitHub 37fea072bc enhance: use urllib join instead of fstring (#9549) 2024-10-21 19:04:28 +08:00
JoeandGitHub 1e7ef46e9c fix: update inner api proxies (#9174) 2024-10-11 11:35:01 +08:00
17fd773a30 chore(api/services): apply ruff reformatting (#7599)
Co-authored-by: -LAN- <[email protected]>
2024-08-26 13:43:57 +08:00
JoeandGitHub 741c548f3c feat: web sso (#7135) 2024-08-25 18:47:02 +08:00
Garfield DaiandGitHub dd94931116 Remove useless code (#4416) 2024-05-15 16:14:49 +08:00
Garfield DaiandGitHub 4481906be2 Feat/enterprise sso (#3602) 2024-04-18 17:33:32 +08:00