Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`--crossplane-binary` requires the Crossplane core binary, but the docs example points at the CLI

オープン
#314 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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?
  1. Install the CLI (curl -sL https://raw.githubusercontent.com/crossplane/crossplane/main/install.sh | sh).
  2. Run crossplane composition render ... --crossplane-binary=$(command -v crossplane), as the docs example shows.
  3. 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 in render.md with 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/crossplane is 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 internal on stderr, could
    say: "the binary at PATH doesn't support internal render; --crossplane-binary needs 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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

crossplane/cli のほかの issue

crossplane/cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。