Legacy v0 tool installer hardcodes amd64 binaries, breaking darwin/arm64 hosts
メンテナーはふだん 2 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 78/100
調査の方向性
まず pkg/app/piped/toolregistry/tool_darwin.go と install.go から始め、次に pkg/app/pipedv1/plugin/kubernetes/toolregistry/scripts.go と pkg/app/pipedv1/cmd/piped/grpcapi/tool_registry.go におけるアーキテクチャのテンプレート処理を比較します。helm_test.go と kustomize_test.go を含む、対象を絞った Kubernetes テストを実行し、amd64 以外のアーキテクチャでレンダリングされたスクリプトのカバレッジを追加します。4 つすべての legacy インストールスクリプトがホストのアーキテクチャを使用し、テストがパスすれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What happened:
The legacy piped v0 tool registry hardcodes amd64 in every Darwin (and Linux) install script for kubectl, kustomize, helm, and terraform. On an Apple Silicon (darwin/arm64) host, toolregistry.InitDefaultRegistry/installKubectl/installKustomize/installHelm/installTerraform in pkg/app/piped/toolregistry/tool_darwin.go unconditionally download the darwin/amd64 build of each tool, so the resulting binaries cannot execute natively on arm64 hosts.
This affects both local development and any test suite that exercises these code paths.
What you expected to happen:
The legacy v0 tool registry should resolve the host OS/architecture dynamically (the same way the newer pipedv1 tool registries already parameterize {{ .Os }} / {{ .Arch }} in their install scripts), so it downloads a binary compatible with the host architecture.
How to reproduce it:
- Use a
darwin/arm64machine (e.g. Apple Silicon Mac). - From the repository root, run:
go test ./pkg/app/piped/platformprovider/kubernetes/... - Observe failures such as:
infork/exec /tmp/piped-bin/helm: bad CPU type in executablehelm_test.goandkustomize_test.go, because the previously-downloadeddarwin/amd64helm/kustomizebinaries cannot run onarm64. - Inspect
pkg/app/piped/toolregistry/tool_darwin.go(lines ~17-55) and confirm every download URL is pinned todarwin/amd64, regardless ofruntime.GOARCH.
Environment:
pipedversion: repository checkout (master)control-planeversion: not applicable- Others: reproduced on macOS
arm64(Apple Silicon); confirmed via static inspection thatpkg/app/piped/toolregistry/tool_darwin.goandpkg/app/piped/toolregistry/install.gonever referenceruntime.GOARCH, unlike thepipedv1tool registries (e.g.pkg/app/pipedv1/plugin/kubernetes/toolregistry/scripts.go,pkg/app/pipedv1/cmd/piped/grpcapi/tool_registry.go) which already template{{ .Os }}/{{ .Arch }}fromruntime.GOOS/runtime.GOARCH.
Suspected root cause:
The older v0 tool registry (pkg/app/piped/toolregistry) uses static, OS-specific install scripts written before Apple Silicon support was considered, while the pipedv1 tool registries were already generalized to resolve the host architecture at install time.
Proposed direction:
Parameterize the Darwin (and Linux) install scripts in pkg/app/piped/toolregistry with the host architecture (runtime.GOARCH), following the pattern already used by the pipedv1 tool registries, and add regression coverage asserting the rendered install scripts reference the host architecture rather than a hardcoded value.
Acceptance criteria:
- Helm, kubectl, kustomize, and Terraform install scripts reference the host architecture instead of a hardcoded
amd64. - The legacy (
pkg/app/piped/toolregistry) andpipedv1tool registries no longer diverge on architecture handling. - Focused tests cover the rendered install scripts for a non-
amd64architecture.
- 主要言語
- Go
- スター
- 1.4k
- フォーク
- 391
- 平均マージ
- 4日 1時間
- マージ済み PR(30日)
- 58
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pipe-cd/pipecd のほかの issue
-
Applications at the repository root are not triggered by new commits対応中かも @Daksha1611 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 2 日以内に返信
-
pipedv1 kubernetes plugins ignore trafficRouting.istio.host in K8S_TRAFFIC_ROUTING対応中かも @Dhirenderchoudhary が今日担当しました。 オープン
難易度 2/5 半日 初心者へのやさしさ 74/100
pipe-cd/pipecd#7626 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
pipectl transfer restore application drops backed-up labels対応中かも @bhavishyajain545 が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
pipe-cd/pipecd#7622 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 2 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
docker-compose: postgres healthcheck should probe TCP (pg_isready -h localhost)対応中かも @zezo-mohamed22 が今日担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
OneBusAway/watchdog#305 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
self-care self-care:agent-discoverability
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
githubnext/gh-cao#20928 ·
メンテナーはふだん 1 日以内に返信
-
automation documentation
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
SocialGouv/iterion#3287 ·
メンテナーはふだん 1 日以内に返信