Remote install: lease is not renewed during artifact upload
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- android, ios, typescript
- Lĩnh vực
- backend-api-design, cli, mobile-dev
Hướng nghiên cứu
Start in src/cli/commands/connection-runtime.ts at allocateOrReuseLease, then trace prepareRemoteRequestArtifacts and uploadArtifact through src/daemon/upload*.ts and src/daemon/resumable-upload*.ts. Compare the lease lifecycle with src/daemon/lease-registry-scope.ts and src/daemon/resumable-upload.ts; done means an upload exceeding the lease TTL can still reach a successful install RPC.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Observed
agent-device install <449 MB .apk> --remote-config <profile> against a remote daemon (EAS Simulator Android session), with a profile that sets no leaseProvider, fails with UNAUTHORIZED: Lease is not active. Diagnostics show: lease_allocate with the default 60 s TTL, then a 1m47s artifact upload with no lease heartbeat, then the install RPC against the expired lease. A 30 MB iOS .app on the same path never hits it.
Cause (as read at efce352)
- The CLI heartbeats or allocates the lease once when the command starts (
src/cli/commands/connection-runtime.ts,allocateOrReuseLease). Nothing in the upload path (prepareRemoteRequestArtifacts/uploadArtifact,src/daemon/upload*.ts,src/daemon/resumable-upload*.ts) touches the lease. - The default connection policy sends no
ttlMs, so the daemon appliesDEFAULT_LEASE_TTL_MS = 60_000(src/daemon/lease-registry-scope.ts). Profiles withleaseProvider: "proxy"get 5 minutes (PROXY_REMOTE_LEASE_TTL_MS), which hides the problem for uploads up to about 5 minutes (about 1.2 GB at 4 MB/s) but does not remove it. - #2517 keeps the lease alive for admitted work, but the install is admitted only after the upload finishes, when the lease may already have expired.
- A client retry cannot recover: the upload preflight never reports a cache hit (
src/daemon/resumable-upload.ts), so a retry uploads again under a new lease and fails the same way.
Expected
An install whose upload takes longer than the lease TTL still succeeds. Possible fixes:
- heartbeat the lease while the upload is in progress,
- have the daemon treat an in-progress upload for a lease as activity on that lease, or
- allocate or renew the lease after the upload finishes and before the install RPC.
Repro
A remote daemon with default lease settings and a profile without leaseProvider; agent-device install of an artifact that takes more than 60 s to upload (for example a 400+ MB debug APK on a ~4 MB/s uplink). With a proxy profile, an upload longer than 5 minutes.
Downstream: appandflow/stim#924. Stim is moving its generated remote profile to the proxy lease policy in appandflow/stim#1029 as a workaround.
- Ngôn ngữ chính
- TypeScript
- Star
- 4.7k
- Fork
- 304
- Merge trung bình
- 11 giờ 29 phút
- Pull request đã merge (30 ngày)
- 514
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của callstack/agent-device
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
callstack/agent-device#1869 ·
-
needs-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 32/100
callstack/agent-device#2948 ·
-
needs-triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
callstack/agent-device#2940 ·
-
bug ready-for-agent
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
callstack/agent-device#2935 ·
-
needs-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
callstack/agent-device#2906 ·
Tất cả issue của callstack/agent-device
Issue tương tự
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Crush Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ElementsProject/cln-application#167 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Quantco/pnpm-licenses#17 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100