Cloud provider `ddp`: Google Developer Device Platform Device Streaming (Android, preview) — implementation plan
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- android, go, google-cloud, grpc
- Lĩnh vực
- backend-api-design, cloud, mobile, testing
Hướng nghiên cứu
Start with the internal/cloud provider interface and the existing direct cloud path (ForwardPort → DialWithOptions → handshake), then read the research and spike result in #434. The plan spans a new gRPC provider, CLI wiring, catalog lookup, token reading, tests, and docs, so it needs substantial project context. Done means all three phases are complete; live verification requires the owner’s request for a specific project.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Follows the research and spike result in #434. Replaces nothing yet: the firebase provider stays until Google's shutdown on September 30, 2027. This is the plan; no code is written.
Scope
A new provider ddp that runs the existing Android flow on a remote device from Google's Device Streaming API, without a relay. Preview (the APIs are v1 and v1alpha, preview) and Android only (the catalog lists no iOS device with the streaming product). Documented as "implemented, tested against a fake server, not yet verified end to end on a live account" until a live run is recorded.
Why it fits
The spike showed that over one DirectAccessService/AdbConnect stream a client can Open{service:"tcp:<port>"} to a process on the device, run shell: / exec: services, and upload bytes (3 MiB, hash matched). So the provider only has to turn that stream into a local TCP port, and the current direct cloud path (ForwardPort -> DialWithOptions -> handshake) works.
Design
- Transport: gRPC only. Create/Get/Cancel and AdbConnect are all RPCs of
DirectAccessService(devicestreaming.googleapis.com:443), so one transport. Use the generateddevicestreamingpbtypes withgrpcdirectly (not the full client library) to keep the dependency footprint small; check each new module against the repository's license-compliance job before adding it. - Auth: Application Default Credentials (
gcloud auth application-default loginorGOOGLE_APPLICATION_CREDENTIALS), throughgolang.org/x/oauth2/google. The only configured value is the Google Cloud project id (cloud.credentials.project_id); no key or token is ever stored inprobe.yaml, printed, or logged. The quota project is that project. - Interface fit (
internal/cloud):UploadApp(path)only records the local APK path (nothing can be pushed before a session exists);appIDis that path.StartSessioncreates the session (MediumPhone.arm-stylemodelCode+ version id; a TTL;clientInfo.client = "flutter-probe"), polls untilACTIVE(13 to 19 s in the spike; timeout configurable, default 3 min), opensAdbConnectwith theX-Omnilab-Session-Nameheader, pushes the APK with anexec:stream (16 KiB chunks) and installs it withpm install -r, then launches the app (monkey-free:am startof the launcher activity, as the local path does).ForwardPort(devicePort)starts a loopback listener on a free port; each accepted connection gets a new stream id andOpen{service:"tcp:<devicePort>"}; two pumps copy bytes both ways; closes propagate asStreamData{close}. One shared gRPC stream, a send mutex, a receive loop that demultiplexes by stream id.StopSessioncancels the session (idempotent) and is also called from a signal handler and on context cancel, so an interrupted run does not leave a billed session behind.
- Agent token. The direct cloud path connects without a token today. Add an optional interface
AgentTokenReader(ReadAgentToken(ctx, session) (string, error)) thatddpimplements with the samerun-as/file read the local Android path uses, over ashell:stream; the CLI uses it when the provider offers it. Never logged. - Devices.
ListDevicesreads the Device Run catalog (devicerun.googleapis.com/v1alpha/.../devices, REST) and keeps Android entries whosesupportedProductsincludedeviceStreaming;--cloud-devicetakes the display model plus version and maps it to themodelCode(a physical model's lower-case catalog id was refused by the API;modelCodeworked). - Safety. Default TTL short (for example 30 minutes,
cloud.ttl), a visible message with the session id and a cancel hint, a documentedcloud.max_sessioncap, and aprobe cloud sessionslisting/cancel command in a later step. Billing is the user's; the docs say device time is billed and link the vendor's pricing page. - Registration and docs.
ValidProviders,--cloud-providerhelp,probe.yaml.example, README farm table (support level "implemented, fake-server tested, not verified live"), the Cloud device farms page, VS Code surfaces,llms.txt, CHANGELOG, migration note fromfirebase.
Tests (all in CI, no network, no credentials)
- A fake
DirectAccessServiceoverbufconnthat implements Create/Get/Cancel and anAdbConnectthat serves:StatusUpdate,shell:/exec:echo and a hash-checked upload,tcp:<port>backed by an in-process TCP echo server,Failstatus for an unavailable port, stream close, and an abrupt stream error. - Unit tests: state machine (
REQUESTED->PENDING->ACTIVE, timeout, unexpected state), cancel onStopSession/ context cancel / signal, bridge with 20 concurrent connections, large transfer (several MiB) through the bridge, token read parsing, catalog filtering and name ->modelCodemapping with anhttptestserver, and a check that no token or credential appears in errors or logs. - A test that the CLI uses the provider's token reader and the direct path (not the relay).
Phases and acceptance
- Transport + fake-server tests (
internal/cloud/ddp*), no CLI wiring. Done when the bridge tests pass under-race. - CLI wiring and docs, preview and Android-only wording, a deprecation cross-link from
firebase. - Live verification, only when the owner asks for it in chat for a specific project: one session, the real agent APK, one
.probefile; record device, API versions and timings indocs/evidence/without account details, then update the support level.
Out of scope
iOS (not offered by the API), the Device Run (batch) API, session reuse across runs, the hosted relay.
Risks
Preview APIs may change; pricing is not published in the pages read; the default session expiry seen was 5 minutes and idle behaviour (inactivityTimeout) is unknown; quotas unknown; a dependency on google.golang.org/grpc and protobuf enlarges the binary.
- Ngôn ngữ chính
- Go
- Star
- 6
- Fork
- 3
- Merge trung bình
- 6 giờ 28 phút
- Pull request đã merge (30 ngày)
- 362
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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 AlphaWaveSystems/flutter-probe
-
agent: is checked on a wrapper holding several checkables answers from the first one in tree orderĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
AlphaWaveSystems/flutter-probe#865 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/cli bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
AlphaWaveSystems/flutter-probe#424 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/docs documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
AlphaWaveSystems/flutter-probe#409 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Dial timeout error should say how long it waited and name the timeout settingCó thể đã có người làm @jay23606 đã nhận 2 ngày trước. Đang mởarea/cli bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
AlphaWaveSystems/flutter-probe#408 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
AlphaWaveSystems/flutter-probe#888 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của AlphaWaveSystems/flutter-probe
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
IBM-Cloud/terraform-provider-ibm#7115 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
fluxcd/notification-controller#1441 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
volcengine/volcengine-go-sdk#163 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
OneBusAway/maglev#2145 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
priority/medium status/ready type/chore
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
discobox-ai/discobox#1357 ·
Maintainer thường phản hồi trong vòng 1 ngày