🤖 fix: renaming a Daytona workspace fails while its sandbox is stopped

Đang mở
#7,250 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
backend

Hướng nghiên cứu

Start with WorkspaceService.rename() and src/node/runtime/DaytonaSSHRuntime.ts, especially the ensureReady() and renameWorkspace() paths described in the issue. Read how terminals and turns ensure the runtime is ready, then add the runtime test for a stopped sandbox. Done means the sandbox starts once and the workspace rename succeeds.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Follow-up from the Codex review of #7100 (thread: https://github.com/coder/xum/pull/7100#discussion_r4353981200, src/node/runtime/DaytonaSSHRuntime.ts:510).

Problem

Renaming a Daytona workspace whose sandbox auto-stopped (30 min idle) or was archived by Daytona fails. WorkspaceService.rename() calls the inherited SSH rename (a remote mv) directly. The Daytona runtime restarts a stopped sandbox only inside ensureReady(), and its one-shot SSH recovery refuses to start a sandbox for a command that did not go through ensureReady(). So the rename fails until the user runs a turn or opens a terminal, which starts the sandbox.

Proposed fix

Bring the sandbox up before the remote move: either WorkspaceService.rename() calls runtime.ensureReady() for runtimes that need it (as terminals and turns do), or DaytonaSSHRuntime overrides renameWorkspace() to run ensureReady() first. Add a runtime test with a stopped sandbox that expects one start and a successful rename.

Why it is deferred

#7100 runs its review loop under a P0/P1-only rule; P2 findings get a tracked follow-up.

Ngôn ngữ chính
TypeScript
Star
2.1k
Fork
139
Merge trung bình
3 giờ 34 phút
Pull request đã merge (30 ngày)
951

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của coder/xum

Tất cả issue của coder/xum

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.