tao.chen
6258cf5d12
fix: offline deploy
2026-08-17 15:59:19 +08:00
tao.chen
0974881fbb
fix: offline deploy
2026-08-17 15:30:21 +08:00
tao.chen
cbfbee7fe0
chore: add CODE_REVIEW.md
2026-08-14 20:55:59 +08:00
tao.chen
b6eb069849
fix(backend): enhance storage/resource concurrency, idempotency, and deletion safety
...
Summary of changes:
- Resources Bind Idempotency (High 1+2):
- Check existing active storage object bindings before duplicate check.
- Return existing binding (`reused: true`) on retry with same upload_id.
- Filter by `status == "active"` to bypass dead/deleted rows during reuse check.
- Storage Concurrent Overwrite (High 3):
- Add `acquire_named_lock` and `release_named_lock` helpers using MySQL `GET_LOCK`/`RELEASE_LOCK` hashed to <= 64 chars.
- Wrap `upload_bytes_to_session` PUT+INSERT critical section with named lock on `object_key`.
- Re-check key collision inside lock; append ULID suffix on collision.
- Shared Reference Deletion Protection (Medium 4):
- Check active references before deleting storage objects in `delete_resource`.
- Delete only `DataResources` record if storage object is still referenced elsewhere.
- Robust Usage Type Fallback (Medium 5):
- Replace direct dict lookup for `USAGE_TYPE_TO_PURPOSE[item.usage_type]` with `.get(..., "workspace")` default.
- Idempotency Key Path Matching (Medium 6):
- Move `file_name`/`target_path` validation forward and include path dimension in comparison.
- Strip uniqueness suffix via `_strip_uniqueness_suffix` before key comparison to avoid false 409s on valid retries.
- Usage Type & Bind Concurrency Control (Low 7 & 8):
- Reject bind requests with 409 if upload session purpose is not `data_resource`.
- Wrap resource duplicate check and creation in named lock using `(owner, directory, name)`.
- Trash Key Uniqueness & Restore Compatibility (Low 9):
- Update `trash_key` format to `{purpose}/{object_key}-{storage_object_id}` to prevent collisions.
- Update `object_key_hash` on trash move.
- Update restore logic in `storage_api.py` to strip suffix while maintaining backward compatibility with legacy keys.
- Dead Code Removal (Low 10):
- Remove unreachable `upload_status = "failed"` and redundant `session.rollback()` in `IntegrityError` block.
- Tests & Mocks:
- Add/update 5 test cases covering non-data_resource bind rejection, suffix stripping, and path recovery.
- Add named lock statement mocks for DB testing.
2026-08-14 20:53:07 +08:00
tao.chen
f72dfd10e8
fix: delete bug
2026-08-14 20:37:25 +08:00
tao.chen
1079b62f0a
update
2026-08-14 20:08:51 +08:00
tao.chen
85b2916850
fix: local_storage_base_dir
2026-08-14 20:03:40 +08:00
tao.chen
25e563dcaa
update: ruff check --fix
2026-08-14 19:51:58 +08:00
tao.chen
d855912791
fix: soft delete helper
2026-08-14 19:39:09 +08:00
tao.chen
76af0f763c
update: README.md
2026-08-14 19:30:25 +08:00
tao.chen
139f2c02c1
fix: delete error
2026-08-14 19:19:41 +08:00
tao.chen
2e070fae78
fix: pre check
2026-08-14 19:13:17 +08:00
tao.chen
5c5dec9a4a
fix: allows_same_name_different_parent
2026-08-14 18:49:27 +08:00
tao.chen
5d49ff5e34
fix: file upload error
2026-08-14 18:22:46 +08:00
tao.chen
c65d6dc684
fix: build error
2026-08-14 17:19:07 +08:00
tao.chen
45cb2f8409
fix: build error
2026-08-14 17:16:53 +08:00
tao.chen
de1682c00d
update: Dockerfile
2026-08-14 17:03:27 +08:00
tao.chen
341cc77a79
update: Dockerfile
2026-08-14 16:02:19 +08:00
tao.chen
2014d59681
update: Dockerfile
2026-08-14 15:55:00 +08:00
tao.chen
7347b409e5
update: port
2026-08-14 15:32:34 +08:00
tao.chen
af9466c4e6
update: UV_HTTP_TIMEOUT
2026-08-14 15:27:16 +08:00
tao.chen
e9a7e1a24e
update: docker-compose.yml
2026-08-14 15:19:29 +08:00
tao.chen
65d14b8610
update: dir tree
2026-08-14 15:02:55 +08:00
tao.chen
4530811441
update: spec
2026-08-14 14:40:34 +08:00
tao.chen
d415154f41
update: migrate
2026-08-14 14:32:44 +08:00
tao.chen
c45687ef18
fix: update unique key
2026-08-14 13:44:57 +08:00
tao.chen
7330f313ff
update: add custom dep
2026-08-14 13:15:18 +08:00
tao.chen
518853cbb0
fix
2026-08-14 12:40:36 +08:00
tao.chen
604e66ffe0
fix: DataResourceUploadModal.tsx
2026-08-14 12:28:22 +08:00
tao.chen
480e1cc638
update: data source
2026-08-14 11:59:06 +08:00
tao.chen
225a585499
update: validate_target_path
2026-08-14 11:32:15 +08:00
tao.chen
b9becffab2
update: 数据资源文件上传
2026-08-14 11:31:48 +08:00
tao.chen
462617b66d
feat: datasource
2026-08-13 20:13:37 +08:00
tao.chen
0b5b50edb9
update: rel path
2026-08-13 19:51:20 +08:00
tao.chen
63a14b1884
fix: params error
...
NameError: name 'session' is not defined
2026-08-13 19:20:36 +08:00
tao.chen
f5cb22e8cd
feat: upload resource
2026-08-13 19:09:13 +08:00
tao.chen
912c0ed22d
Merge branch 'refactor/storage' into develop
2026-08-13 18:11:50 +08:00
tao.chen
19157ad20b
test
2026-08-13 18:08:12 +08:00
tao.chen
532f0d6c91
fix: dir tree
2026-08-13 12:12:58 +08:00
tao.chen
3094a47298
fix: path error
2026-08-13 11:48:24 +08:00
tao.chen
83d0e0adca
fix: bug
...
1. Cannot find name 'PythonEditorBuffer'
2. Cannot find name 'PythonEditor'
2026-08-13 11:26:31 +08:00
tao.chen
1ad0ec9dbf
update: docker-compose.yml
2026-08-13 11:03:08 +08:00
tao.chen
dc68739216
Merge remote-tracking branch 'aliyun/develop' into develop
2026-08-13 11:01:43 +08:00
tao.chen
49c8a27841
update: update storage struct
2026-08-13 11:01:37 +08:00
tao.chen
da9a1ec472
update: storage path
2026-08-13 09:35:27 +08:00
tao.chen
302bda2ee9
fix: directory tree
2026-08-12 20:45:29 +08:00
tao.chen
d600d5dbb1
fix: directory cached
2026-08-12 20:41:44 +08:00
tao.chen
b1ceaeb173
fix: storage and directories bug
2026-08-12 20:18:29 +08:00
tao.chen
0bcdbb1068
fix: add logging limit
2026-08-12 19:52:14 +08:00
tao.chen
9d0ca1e8b6
fix: READINESS_TARGETS
2026-08-12 19:49:05 +08:00
tao.chen
8abe505d17
fix: multi owner
2026-08-12 18:58:18 +08:00
tao.chen
495018de34
update: workspace lazy load
2026-08-12 18:36:17 +08:00
tao.chen
c6c2481b96
feat: workspace 目录树服务端懒加载
...
- api.ts: listWorkspaceDirectories 支持 parent_path 查询; WorkspaceDirectory 增加 has_children; 同步 WorkspaceBoundApi 签名
- AuthContext: 绑定透传 parentPath
- scriptWorkspaceStore: 新增 expandedPaths/loadingChildrenPaths/loadedChildPaths, loadChildren/toggleExpanded, 局部刷新 createFolder/deleteDirectory
- WorkspaceTree: 移除 useState, 改为受控展开/加载状态
- ScriptExplorer: 从 store 读取并透传展开状态与 toggle
2026-08-12 18:06:35 +08:00
tao.chen
a09551bd3c
update: workspace members 403
2026-08-12 17:14:47 +08:00
tao.chen
6b9f851810
update: scripts.py api
2026-08-12 17:14:18 +08:00
tao.chen
a86432b102
update: PythonEditor.tsx
2026-08-12 16:58:00 +08:00
tao.chen
2fcdf51cfc
update: PythonEditor.tsx
2026-08-12 16:49:21 +08:00
tao.chen
dc4d190935
fix: python script 404
2026-08-12 13:45:15 +08:00
tao.chen
91339aa993
update: docker-compose.yml
2026-08-12 13:33:29 +08:00
tao.chen
416ff4d06a
feat: add logger
2026-08-12 12:43:31 +08:00
tao.chen
3981c32781
refactor: directory
2026-08-12 12:23:19 +08:00
tao.chen
a378ea5352
feat: add pytest in dev
2026-08-12 12:21:48 +08:00
tao.chen
e23df83e0d
fix: bugs
2026-08-11 22:03:01 +08:00
tao.chen
bff7b7f9a6
fix: bugs
2026-08-11 21:53:52 +08:00
tao.chen
dd6f176ca8
fix: file lock
2026-08-11 21:26:55 +08:00
tao.chen
d4013a07a9
rollback
2026-08-11 20:41:15 +08:00
tao.chen
e1360c5c38
test: backend
2026-08-11 20:09:44 +08:00
tao.chen
e80cbbd81c
feat: execute node python version
2026-08-11 19:00:55 +08:00
tao.chen
38cd06ee7a
update: clean dockerfile
2026-08-11 18:57:34 +08:00
tao.chen
05091c425a
update: filter by owner / visibility
2026-08-11 18:56:47 +08:00
tao.chen
c63f745374
fix: error
2026-08-11 18:42:15 +08:00
tao.chen
ca12646387
update: env error
2026-08-11 18:26:37 +08:00
tao.chen
78e83e1765
fix: migrate bug
2026-08-11 18:13:15 +08:00
tao.chen
ed7a6cd858
fix: migrate bug
2026-08-11 18:05:34 +08:00
tao.chen
1b0083be47
refactor: kernel spec
2026-08-11 17:47:39 +08:00
tao.chen
6c6e7e6500
update: python script run in python intercept
2026-08-11 16:20:40 +08:00
tao.chen
ec9effc254
update: npm registry
2026-08-11 16:19:34 +08:00
tao.chen
b49d804718
update: upgrade base image
2026-08-11 16:12:24 +08:00
tao.chen
fe7f1a744e
feat: schedule node add python version
2026-08-11 15:56:05 +08:00
tao.chen
e28bc39328
fix: default user
2026-08-11 15:13:26 +08:00
tao.chen
4269eed018
fix: 422 error
2026-08-11 15:13:13 +08:00
tao.chen
b44d057241
feat: preview components
2026-08-11 15:02:16 +08:00
tao.chen
5969f2f749
reformatter
2026-08-11 11:13:13 +08:00
tao.chen
b00a0e9ae1
fix: hook
2026-08-07 20:42:36 +08:00
tao.chen
567786215e
refactor: SchedulePage.tsx
2026-08-07 20:40:41 +08:00
tao.chen
084de5b2d6
fix: storage.py
2026-08-07 20:14:29 +08:00
tao.chen
a97aad3179
fix: schedule error
2026-08-07 19:59:04 +08:00
tao.chen
e7bce03794
fix: storage_api.py
2026-08-07 19:58:42 +08:00
tao.chen
7b4b752109
fix: import workspace member
2026-08-07 19:25:04 +08:00
tao.chen
45808192e0
refactor: SchedulePage.tsx
2026-08-07 19:19:37 +08:00
tao.chen
6ff2127de7
update: add logger info
2026-08-07 19:19:25 +08:00
tao.chen
ed517c488b
Merge remote-tracking branch 'aliyun/develop' into develop
2026-08-07 18:50:57 +08:00
tao.chen
14c41a22b6
fix: runtime timeout
2026-08-07 18:50:48 +08:00
tao.chen
37d89c74d6
Merge remote-tracking branch 'aliyun/develop' into develop
2026-08-07 18:22:08 +08:00
tao.chen
e2615be2e8
refactor: extract components
2026-08-07 17:38:28 +08:00
tao.chen
873a464629
fix: auth error
2026-08-07 16:14:13 +08:00
tao.chen
10347efa73
update: exclude hidden dir
2026-08-07 15:08:36 +08:00
tao.chen
2ee36b48ec
update: auth
...
update auth api
2026-08-07 14:41:20 +08:00
tao.chen
984894d797
refactor: SchedulesPageRoute.tsx, UserManagementPage.tsx, ProjectManagementPage.tsx
2026-08-07 14:40:46 +08:00
tao.chen
ec57fb6c7e
update: storage
...
update storage base path
2026-08-07 14:37:56 +08:00