Commit Graph
185 Commits
Author SHA1 Message Date
tao.chen 85eb19546e feat: add password 2026-08-04 16:05:54 +08:00
xiaozhu a4019b1a74 fix:脚本文件标签栏 2026-08-04 15:53:17 +08:00
xiaozhu eace1109ac 系统管理页面部分更改 2026-08-04 14:49:10 +08:00
Winnie f3cc83c5fa Merge branch 'develop' of http://8.153.151.51:8888/team_group/model-develop into develop
# Conflicts:
#	schedule/src/schedule/orchestrator.py
#	schedule/src/schedule/worker.py
2026-08-04 14:41:22 +08:00
tao.chen 94a1aef7c7 fix: script not found 2026-08-04 14:24:55 +08:00
Winnie a2deae2f22 修复调度运行失败 2026-08-04 14:09:03 +08:00
tao.chen 1cf2eecbc9 chore: frontend and schedule module 2026-08-04 13:58:19 +08:00
tao.chen e18a7a34a3 update: save version 2026-08-04 13:35:16 +08:00
tao.chen 14e84b6ce2 fix: path error 2026-08-04 13:05:18 +08:00
tao.chen 2a23030d6f fix: path error 2026-08-04 12:57:40 +08:00
tao.chen 4919fe0909 update: create file 2026-08-04 12:40:38 +08:00
tao.chen a27cda5a0c fix: jupyter start params 2026-08-04 12:03:43 +08:00
tao.chen 60b17f5bef update: jupyter start dir 2026-08-04 11:59:04 +08:00
tao.chen ddf112034d update: jupyter api payload, wire os.environ 2026-08-04 11:29:33 +08:00
tao.chen 173d562bd1 update: debug create file by jupyter 2026-08-04 11:06:52 +08:00
tao.chen d45109916a chore: update docker-compose.yml 2026-08-04 10:30:24 +08:00
tao.chen 078d8f8687 update: delete vfs refresh 2026-08-04 09:37:14 +08:00
tao.chen 1bd7da384c feat: add loguru 2026-08-03 20:45:00 +08:00
tao.chen 939a579b07 feat: rclone client 2026-08-03 20:37:56 +08:00
tao.chen 134f8ca552 feat: refresh VFS 2026-08-03 20:23:18 +08:00
tao.chen e1172a0091 update: rclone add remote control 2026-08-03 20:02:42 +08:00
tao.chen 85791ab1ea update: rclone add remote control 2026-08-03 19:57:29 +08:00
tao.chen e19340332a update: hide top-panel 2026-08-03 19:51:24 +08:00
tao.chen 6c4bf47487 update: hide top-panel 2026-08-03 19:43:51 +08:00
tao.chen 2c54f88181 fix: notebook-dir 2026-08-03 19:12:40 +08:00
Winnie feae98cc24 第一次合并develop-fech 2026-08-03 18:27:53 +08:00
Winnie d7bd88335c merge: integrate feat/auth into develop 2026-08-03 17:44:00 +08:00
tao.chen 386efb4d98 update: add volumes 2026-08-03 13:55:41 +08:00
Winnie fd5ea4d33e fix(frontend): support HTTP UUID fallback and bundle Inter fonts 2026-08-03 13:30:03 +08:00
tao.chen 76a572af0d Merge remote-tracking branch 'aliyun/develop' into develop 2026-08-03 11:14:16 +08:00
tchen 48414cb958 Merge branch 'main' into 'develop'
# Conflicts:
#   default.conf
#   docker-compose.yml
#   frontend/Dockerfile
#   frontend/README.md
#   frontend/app/app.css
#   frontend/app/root.tsx
#   frontend/app/routes.ts
#   frontend/package.json
#   frontend/vite.config.ts
2026-08-03 02:56:26 +00:00
tao.chen 7a3c2452e1 feat: auth 2026-08-03 10:51:55 +08:00
tao.chen bededeb101 optimize: add routes 2026-08-03 10:49:39 +08:00
tao.chen a44b984203 chore: rollback mount path 2026-07-31 19:49:02 +08:00
Winnie 4ac8485d3e Merge branch 'develop' of http://8.153.151.51:8888/team_group/model-develop into develop 2026-07-31 19:17:24 +08:00
Winnie 49ee2c0a4a feat: 完善模型平台相关功能 2026-07-31 19:10:37 +08:00
tao.chen 838cbfdc16 chore: else bug 2026-07-31 18:39:44 +08:00
tao.chen fb073c6f99 feat: auth 2026-07-31 17:22:25 +08:00
tao.chen 1994937349 chore: fix dockefile 2026-07-31 15:52:49 +08:00
tao.chen d31fde6abc chore: fix debian source 2026-07-31 15:48:16 +08:00
tao.chen ba96f4f52a chore: update debian source 2026-07-31 15:45:17 +08:00
tao.chen 86988bdaef chore: frontend build 2026-07-31 15:08:31 +08:00
tao.chenandClaude 9fc886a55e perf: decouple notebook execution and tune pools
schedule:
- New _execution_loop runs alongside _database_event_loop. It claims
  job.node.execute rows, sets a 30-min lease on available_at, then
  dispatches each as asyncio.create_task under a Semaphore(N).
  Polling loop is back to sub-millisecond turnaround for
  schedule.run.requested and job.node.finished. Long notebook
  execution no longer blocks DAG advance events.
- _process_pending_events filters by event_type IN
  ('schedule.run.requested', 'job.node.finished'); the executor
  loop owns job.node.execute exclusively.
- _process_outbox_event builds a plain dict envelope before
  handler dispatch; the previous ORM-row handoff risked
  DetachedInstanceError once the outer session closed.
- _sync_once uses get_job + reschedule_job for existing job ids
  instead of add_job(replace_existing=True). Each cron schedule
  no longer removed-and-readded every 5s.
- service.py threads settings.schedule_execution_concurrency into
  the orchestrator (default 4).

common:
- create_async_engine gets explicit pool_size=10, max_overflow=20,
  pool_recycle=1800. No more relying on SQLAlchemy defaults.
- New schedule_execution_concurrency setting.

runtime:
- scan_workspaces: add missing 'import os' (NameError on startup)
  and switch to asyncio.gather bounded by Semaphore(4) so N
  workspaces start in parallel instead of sequentially.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-31 15:07:57 +08:00
tao.chenandClaude b0f93d976f build: switch services to gunicorn with per-service config
Replace uvicorn with gunicorn + UvicornWorker in backend, runtime,
and schedule Dockerfiles. New gunicorn.conf.py per service exposes
bind/workers/timeout/graceful_timeout as GUNICORN_* env knobs.

Notable details:
- schedule: timeout=0 (disables gunicorn worker heartbeat) so long
  notebook execution isn't killed by gunicorn's silent-worker kill.
- All three configs: drop dead threads=4 setting; UvicornWorker is
  async and ignores threads.
- Pin gunicorn>=26.0.0 in each pyproject; uv.lock regenerated.
- Drop stale 'COPY contracts ./contracts' from runtime and schedule
  Dockerfiles (contracts dir was deleted in an earlier refactor;
  builds would have failed).
- backend Dockerfile: switch to uv sync layout matching runtime/
  schedule; add build deps for native wheels.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-31 15:07:45 +08:00
tao.chenandClaude 245f4d346d fix: repair storage hot-path bugs and missing imports
- scripts.update_script: repoint script.current_object_id to the
  newly uploaded StorageObject and best-effort delete the old
  working copy. Previously the old row was mutated with the new
  content_hash while the script still pointed at it, silently
  losing user edits on the next publish_version.
- scripts.publish_version: read object bytes via the new
  RustFSObjectStore.get_bytes() instead of the non-existent
  .get_object(); publish 500'd on every call.
- scripts.upload_script / storage_api.complete_upload_record:
  Path(file_name) raised NameError (only PurePosixPath imported),
  crashing every upload and every upload finalization. Use
  PurePosixPath.
- RustFSObjectStore: add get_bytes() helper (sync, body.close in
  finally) for in-process callers that need raw bytes.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-31 15:07:35 +08:00
tao.chen 76b3edd018 refactor: add API md 2026-07-31 13:41:37 +08:00
tao.chen 72b7adb8c4 refactor: delete contracts 2026-07-31 13:41:18 +08:00
tao.chen 2874ccdce3 docs: README + DEVELOP — code map, Settings, bucket routing, troubleshooting
- README: refresh "what it does", "architecture at a glance", "containers"
  table, "configuration", "storage layout" (with usage_type→bucket
  routing table), and add "documentation" section pointing to
  ARCHITECTURE / HANDOVER / DEVELOP / CLAUDE.

- DEVELOP: add the developer-facing guide that was previously only in
  CLAUDE.md. Covers code layout, the Settings singleton, conventions
  (DB / Storage / Auth / Permission gates / Outbox / async-sync
  signatures), local dev workflow, common tasks (adding a DAG endpoint,
  env var, MySQL table, RustFS bucket, schedule node type), tests
  status, and a troubleshooting section with the four real bugs hit
  this session (greenlet, MySQL, Jupyter 401, Schedule not advancing).
2026-07-31 13:37:14 +08:00
tao.chen d377ba3cfe refactor: object_key flat layout + usage_type→bucket routing + Settings singleton
- common.config.Settings: pydantic-settings with @lru_cache singleton;
  all env vars now declared in one place (database / JWT / RUSTFS_*
  credentials + 3 purpose-named buckets / workspace FS roots / etc.).
  Replaces os.environ / os.getenv in backend / schedule / runtime /
  common modules.

- storage_api: object_key layout flattens from
  "{ws}/{usage_type}/{ulid}/{name}" to "{ws}/{ulid}". File name, type,
  and logical path live in the StorageObjects / Scripts row, not in
  the S3 key, so the bucket can be re-organised without a DB rewrite.

- storage_api: new BUCKET_FOR_USAGE map and resolve_bucket() helper
  route uploads by usage_type to the right purpose-named bucket:
    working_copy / public_script / data_resource / snapshot
      → RUSTFS_WORKSPACE_BUCKET (workspaces)
    version_artifact
      → RUSTFS_VERSION_BUCKET (versions)
    run_log / run_result
      → RUSTFS_RUN_LOG_BUCKET (run-logs)
  workspace.artifact_bucket override wins over the default for that
  workspace. Unknown usage_type falls through to the workspace bucket
  so uploads are never silently dropped.

- backend.main lifespan: ensure_bucket loops over all three buckets at
  startup.

- common.storage.schemas: extend usage_type Literal to include
  working_copy / public_script (consumed by scripts.py after the local
  FS removal).

- common.storage.client: raise StorageClientError / StorageUnavailable /
  StorageRequestFailed instead of FastAPI HTTPException, so the client
  is usable from non-FastAPI contexts (e.g. schedule worker). The
  register_workspace_object method is removed (the local-FS path it
  routed to no longer exists).

- common.pyproject.toml: add greenlet>=3.0.0 (SQLAlchemy 2.0 async
  engine.dispose() requires it) and pydantic-settings>=2.14.2.

Verified: backend.main 57 routes; docker compose config; 20 SQLAlchemy
tables, 0 ForeignKey; grep os.environ / os.getenv in
backend|schedule|runtime|common = 0.
2026-07-31 13:37:04 +08:00
tao.chen 2e066db04a feat: add DEVELOP.md 2026-07-31 13:34:55 +08:00