`--crossplane-binary` requires the Crossplane core binary, but the docs example points at the CLI
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- ドキュメント
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- go
- 領域
- cli, documentation
調査の方向性
cmd/crossplane/render/engine.go:73 と cmd/crossplane/render/xr/help/render.md#L49-L54 を読み、その後、cmd/crossplane/render/engine_local.go にあるドキュメント化された呼び出しとローカル engine のエントリーポイントを確認します。完了条件は、flag と埋め込み例で Crossplane コアバイナリが明確に必要であること、最小バージョン v2.3.0 とダウンロード先が示されていること、そしてユーザーを CLI パスに案内しなくなっていることです。
索引モデルが issue の本文から書いたものです。
説明
What happened?
--crossplane-binary requires the Crossplane core binary (crossplane/crossplane), but nothing
says so, and the docs example points at the path where the CLI installs itself. The documented
invocation always fails.
Flag help (cmd/crossplane/render/engine.go:73):
--crossplane-binary=PATH Path to a local crossplane binary to use instead of Docker.
Docs example (cmd/crossplane/render/xr/help/render.md#L49-L54). /usr/local/bin/crossplane is
exactly where install.sh puts the CLI:
crossplane composition render xr.yaml composition.yaml functions.yaml \
--crossplane-binary=/usr/local/bin/crossplane
The local engine shells out to crossplane internal render
(cmd/crossplane/render/engine_local.go:66), and internal render is a hidden subcommand of the
core binary (crossplane/crossplane, cmd/crossplane/internal.go, cmd/crossplane/main.go#L57),
not of the CLI:
$ crossplane composition render xr.yaml composition.yaml functions.yaml \
--crossplane-binary=$(command -v crossplane)
crossplane: error: cannot render composite resource: crossplane internal render returned error with output:
crossplane: error: unexpected argument internal
: exit status 80
Nothing there says "wrong binary", and since internal is hidden:"", crossplane --help lists it
on neither binary. The requirement isn't discoverable from the tooling.
The core binary does work, but it's not a GitHub release asset and install.sh doesn't fetch it. It
lives at https://releases.crossplane.io/stable/<version>/bin/<os>_<arch>/crossplane; verified with
v2.4.0:
$ ./crossplane-core internal --help
Usage: crossplane internal <command> [flags]
Commands:
internal render [flags]
Render resources using the real reconciler engine. Not for direct use.
cmd/crossplane/internal.go first appears in core v2.3.0 (absent in v2.2.0), so v2.3.0 is the floor.
Both pieces of affected text live in this repo (the kong flag help in cmd/crossplane/render/engine.go and the embedded help page cmd/crossplane/render/xr/help/render.md), so this isn't a docs-site issue.
How can we reproduce it?
- Install the CLI (
curl -sL https://raw.githubusercontent.com/crossplane/crossplane/main/install.sh | sh). - Run
crossplane composition render ... --crossplane-binary=$(command -v crossplane), as the docs example shows. crossplane: error: unexpected argument internal.
Reproduced with CLI v2.4.0 and v2.4.1.
What environment did it happen in?
- Crossplane CLI version: v2.4.0 and v2.4.1
- Platform (e.g., linux/amd64): darwin/arm64
- Crossplane version (if applicable): core v2.4.0 (works), CLI v2.4.0/v2.4.1 (fails)
Why it matters
--crossplane-binary is the documented escape hatch for machines without a working Docker daemon,
and those are the machines that need it. Podman is the common case (#299, and the same failure with
409 instead of 500):
cannot render composite resource: crossplane internal render in Docker returned error with output:
: failed to attach to container: unable to upgrade to tcp, received 409
So a Podman user follows the docs to --crossplane-binary, points it at the crossplane on their
PATH as the example shows, and hits unexpected argument internal. At that point render has no
working path at all, and no error in the chain points at the cause.
What would help
- Say "core" wherever the flag appears. Flag help: "Path to a local Crossplane core binary
(not the Crossplane CLI)...", plus a line inrender.mdwith the download location
(https://releases.crossplane.io/stable/<version>/bin/<os>_<arch>/crossplane) and the v2.3.0 minimum. - Fix the docs example.
/usr/local/bin/crossplaneis the CLI's own install path, so it reads as
an endorsement of the one binary that can't work. - Fail actionably. A preflight check, or matching
unexpected argument internalon stderr, could
say: "the binary at PATH doesn't supportinternal render;--crossplane-binaryneeds the
Crossplane core binary (v2.3.0+), not the CLI. Get it from releases.crossplane.io/stable/...". - A Podman note in the docs, since the attach failure gives no hint that the runtime is the problem.
Happy to send a PR for the docs and flag-help wording.
- 主要言語
- Go
- スター
- 19
- フォーク
- 31
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 53
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
crossplane/cli のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
crossplane/cli#282 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
crossplane/cli#384 ·
-
crossplane/cli#379 · 担当者 1 名 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
crossplane/cli#370 · リアクション 1 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
crossplane/cli#369 ·
似ている issue
-
bug github_actions
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
registrystack/registry-stack#1393 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
JakeChampion/lang#10213 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
oasisprotocol/oasis-sdk#2523 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100