`drive files download` vs `drive files get --params alt=media`: guide which to use; `download` returns 500 `backendError` on ordinary files
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 62/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 領域
- cli, cloud, documentation
調査の方向性
まず drive files download のヘルプ出力と、既存の Drive レシピまたはドキュメントを確認します。ドキュメントに記載されている download と files get --params '{"alt":"media"}' のパスを比較し、通常のファイルについての案内を明確にします。完了の条件は、ユーザーが動作するバイナリダウンロードのパターンに誘導され、長時間実行オペレーションの範囲が明確になっていることです。
索引モデルが issue の本文から書いたものです。
説明
Problem
Two subcommands look like they do the same thing, but only one works for ordinary file downloads:
gws drive files download→ always returns500 Internal error encountered(backendError) on regular Drive files (My Drive WAV/JPG/JSON/PDF, etc.)gws drive files get --params '{"alt":"media"}'→ works correctly
The name download strongly suggests it's the right choice, especially for agents/LLMs generating calls from the schema. It isn't — drive.files.download is a long-running operation (POST) intended for a narrow set of cases (e.g. exporting Google Vids, large export operations). For arbitrary binary downloads the correct call is files.get with alt=media.
Reproduction
FID="<any regular Drive file ID>"
# Fails every time:
gws drive files download --params "{\"fileId\":\"$FID\",\"alt\":\"media\"}" -o out.bin
# → { "error": { "code": 500, "message": "Internal error encountered.", "reason": "backendError" } }
# Works every time:
gws drive files get --params "{\"fileId\":\"$FID\",\"alt\":\"media\"}" -o out.bin
Verified on `gws 0.22.5` (macOS, Apple Silicon). 3/3 failures vs 3/3 successes against the same file ID.
Why this hurts
Agents that write calls from the discovery schema gravitate to the one literally named `download`. The resulting 500 gives no hint that a different verb is the right answer; users spend a long time assuming Drive is down or the CLI is broken. (I sunk ~30 minutes before figuring it out.)
Suggestions (any one helps)
- Help text / docs — add a one-liner to `drive files download --help` and any relevant recipe: "For ordinary file content downloads use `drive files get --params '{"alt":"media"}'`; this command is for long-running operations only."
- Recipe — add `recipe-drive-download` (or similar) that shows the `files.get` + `alt=media` pattern with `-o` for binaries and stdout for text.
- Pre-flight warning — if `drive files download` is invoked against a file whose MIME type doesn't require the long-running path, emit a warning pointing at `files get`.
Happy to open a PR for (1) if that's the preferred shape.
- 主要言語
- Rust
- スター
- 31.1k
- フォーク
- 1.8k
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
googleworkspace/cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
googleworkspace/cli#921 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
googleworkspace/cli#920 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
googleworkspace/cli#914 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
googleworkspace/cli#882 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
googleworkspace/cli#858 ·
googleworkspace/cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
gitbutlerapp/gitbutler#15998 · コメント 1 件 ·
-
bug triage:deciding
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
open-telemetry/otel-arrow#4132 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100