GareArc
8a21fd88fd
feat: add global license check middleware to block API access on expiry
...
Add before_request middleware that validates enterprise license status
for all /console/api endpoints when ENTERPRISE_ENABLED is true.
Behavior:
- Checks license status before each console API request
- Returns 403 with clear error message when license is expired/inactive/lost
- Exempts auth endpoints (login, oauth, forgot-password, etc.)
- Exempts /console/api/features so frontend can fetch license status
- Gracefully handles errors to avoid service disruption
This ensures all business APIs are blocked when license expires,
addressing the issue where APIs remained callable after expiry.
2026-03-04 20:40:29 -08:00
GareArc
1c1bcc67da
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:55:03 -08:00
木之本澪
2b5ce196ad
test: migrate test_document_service_rename_document SQL tests to testcontainers ( #32542 )
...
Co-authored-by: KinomotoMio <200703522+KinomotoMio@users.noreply.github.com>
2026-03-05 10:07:29 +09:00
dependabot[bot]
a0331b8b45
chore(deps): bump authlib from 1.6.6 to 1.6.7 in /api ( #32998 )
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 09:50:12 +09:00
dependabot[bot]
914bd4d00d
chore(deps): bump fickling from 0.1.8 to 0.1.9 in /api ( #32999 )
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-05 09:49:43 +09:00
木之本澪
df3c66a8ac
test: migrate duplicate_document_indexing_task SQL tests to testcontainers ( #32540 )
...
Co-authored-by: KinomotoMio <200703522+KinomotoMio@users.noreply.github.com>
2026-03-05 02:35:24 +09:00
wangxiaolei
882b4c9ef6
refactor: document extract node decouple ssrf_proxy ( #32949 )
2026-03-04 16:01:43 +08:00
L1nSn0w
3aed24c507
fix(api): decouple enterprise default-workspace join from personal workspace creation ( #32938 )
2026-03-04 14:16:23 +08:00
QuantumGhost
e1e1f81bde
perf(api): utilize the message_workflow_run_id_idx while querying messages ( #32944 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-04 14:11:14 +08:00
Renzo
ad000c42b7
feat: replace db.session with db_session_with_containers ( #32942 )
2026-03-04 14:50:41 +09:00
wangxiaolei
2f4c740d46
feat: support redis xstream ( #32586 )
2026-03-04 13:18:55 +08:00
wangxiaolei
e14b09d4db
refactor: human input node decouple db ( #32900 )
2026-03-04 13:18:32 +08:00
wangxiaolei
b584434e28
feat: redis connection support max connections ( #32935 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-04 11:52:43 +08:00
木之本澪
6002fd09b4
test: migrate test_dataset_service_create_dataset SQL tests to testcontainers ( #32538 )
...
Co-authored-by: KinomotoMio <200703522+KinomotoMio@users.noreply.github.com>
2026-03-04 03:40:18 +09:00
Br1an
2b47db0462
fix(api): resolve OpenTelemetry histogram type mismatch ( #32771 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-04 00:01:16 +09:00
木之本澪
65bf632ec0
test: migrate test_dataset_service_batch_update_document_status SQL tests to testcontainers ( #32537 )
...
Co-authored-by: KinomotoMio <200703522+KinomotoMio@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-03 20:29:58 +09:00
FFXN
2068640a4b
fix: Add the missing validation of doc_form in the service API. ( #32892 )
2026-03-03 15:54:43 +08:00
99
c8688ec371
refactor(dify_graph): unify invoke and user enums source in workflow ( #32873 )
2026-03-03 15:05:20 +08:00
dependabot[bot]
56f460e290
chore(deps): bump pypdf from 6.7.4 to 6.7.5 in /api ( #32882 )
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-03 14:42:05 +09:00
wangxiaolei
1b2234a19f
refactor: TemplateTransformNode decouple code executor ( #32879 )
2026-03-03 13:36:17 +08:00
-LAN-
4fd6b52808
refactor(api): move model_runtime into dify_graph ( #32858 )
2026-03-02 20:15:32 +08:00
wangxiaolei
e985e73bdc
perf: optimize dataset api query speed ( #32847 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 18:49:21 +08:00
-LAN-
c917838f9c
refactor: move workflow package to dify_graph ( #32844 )
2026-03-02 18:42:30 +08:00
wangxiaolei
707bf20c29
refactor: knowledge index node decouples business logic ( #32274 )
2026-03-02 17:54:33 +08:00
Br1an
68647391e7
fix(api): add return type annotation to filter_none_values() ( #32774 )
2026-03-02 17:51:21 +09:00
wangxiaolei
5c7a293ba7
feat: ensure document id is not missing ( #32765 )
2026-03-02 16:28:31 +08:00
Xiyuan Chen
8a7ba87349
fix: upgrade OpenTelemetry to 0.49b0 to fix context detach error ( #32825 )
2026-03-02 16:03:37 +09:00
Varun Chawla
9ddbc1c0fb
fix: map all NodeType values to span kinds in Arize Phoenix tracing ( #32059 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Crazywoola <100913391+crazywoola@users.noreply.github.com>
2026-03-02 14:54:26 +08:00
Stable Genius
42a8d962a0
refactor: remove tests and core/rag from pyrefly excludes ( #32801 )
...
Co-authored-by: Stable Genius <259448942+stablegenius49@users.noreply.github.com>
2026-03-02 15:31:29 +09:00
wangxiaolei
cc127f5b62
fix: fix chat assistant response mode blocking is not work ( #32394 )
...
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 14:05:04 +08:00
dependabot[bot]
aca3d1900e
chore(deps-dev): update types-aiofiles requirement from ~=24.1.0 to ~=25.1.0 in /api ( #32803 )
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 13:59:53 +09:00
dependabot[bot]
ddc47c2f39
chore(deps): update pyjwt requirement from ~=2.10.1 to ~=2.11.0 in /api ( #32804 )
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 13:59:06 +09:00
hj24
8cc775d9f2
fix: optimize workflow_run iter query ( #32815 )
2026-03-02 11:01:11 +08:00
edvatar
00dbaef04f
fix: use declared_attr.directive for WorkflowNodeExecutionModel.__table_args__ ( #32656 )
...
Signed-off-by: edvatar <88481784+toroleapinc@users.noreply.github.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-03-02 10:15:06 +08:00
edvatar
248202c220
fix: remove references to non-existent Document attributes in test ( #32654 )
...
Signed-off-by: edvatar <88481784+toroleapinc@users.noreply.github.com>
Co-authored-by: Asuka Minato <i@asukaminato.eu.org>
2026-03-02 10:14:56 +08:00
HanWenbo
691c9911c7
fix(ci): make pyrefly diff comments focus on diagnostics ( #32778 )
2026-03-02 10:11:23 +08:00
Copilot
baeea77c5b
fix: typo in WebScraper plugin description: "Scrapper" → "Scraper" ( #32790 )
...
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
2026-03-02 10:10:28 +08:00
wangxiaolei
9da98e6c6c
fix: fix import error ( #32800 )
2026-03-02 08:59:53 +08:00
99
a01de98721
refactor(workflow): decouple start node external dependencies ( #32793 )
2026-03-02 02:01:41 +08:00
-LAN-
17c1538e03
refactor(workflow): move PromptMessageMemory to model_runtime.memory ( #32796 )
...
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-03-02 01:58:02 +08:00
-LAN-
69b3e94630
refactor: inject workflow node memory via protocol ( #32784 )
2026-03-02 01:55:49 +08:00
-LAN-
ef2b5d6107
refactor(api): move llm quota deduction to app graph layer ( #32786 )
2026-03-01 23:25:36 +08:00
-LAN-
ffe77fecdf
revert(graph-engine): rollback stop-event unification ( #32789 )
2026-03-01 19:43:05 +08:00
weiguang li
b462a96fa0
fix: serialize data_source_info with json.dumps in Notion sync task ( #32747 )
2026-03-01 19:37:51 +08:00
盐粒 Yanli
bc6fd0b5dd
chore: remove ty from backend type-check pipeline ( #32782 )
2026-03-01 19:10:24 +08:00
-LAN-
53c62fde33
fix(api): enforce ownership check for conversation delete ( #32686 )
2026-03-01 17:53:37 +08:00
akkoaya
f0f01c69aa
fix: add missing pipeline_templates ( #31528 )
...
Co-authored-by: FFXN <31929997+FFXN@users.noreply.github.com>
2026-03-01 17:33:04 +08:00
L1nSn0w
337161cdb9
feat(enterprise): auto-join newly registered accounts to the default workspace ( #32308 )
...
Co-authored-by: Yunlu Wen <yunlu.wen@dify.ai>
2026-03-01 16:53:09 +08:00
99
00e52796e6
refactor(workflow): remove code node helper imports ( #32759 )
...
Co-authored-by: -LAN- <laipz8200@outlook.com>
2026-03-01 16:31:45 +08:00
tda
4b8a02cf25
fix: add return type annotation to auth decorators ( #32699 )
...
Co-authored-by: root <root@DESKTOP-KQLO90N>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-03-01 17:19:33 +09:00