Skip to content

publish: build plugins for the platform the service runs them on - #51

Merged
ZergsLaw merged 1 commit into
masterfrom
feat/publish-builds-for-server-platform
Oct 30, 2026
Merged

ZergsLaw merged 1 commit into
masterfrom
feat/publish-builds-for-server-platform

Conversation

@ZergsLaw

Copy link
Copy Markdown
Contributor

plugins publish собирал плагин под архитектуру машины, где запущен, поэтому с Mac на amd64-сервис уезжал arm64-бинарник, а проверочный запуск на том же Mac этого не ловил. Теперь сервис отдаёт свою платформу в новом поле PluginsResponse.platform (GOOS/GOARCH сервера), SDK читает её методом Platform(), и publish после preflight собирает и проверяет плагины под неё, с эмуляцией при необходимости; --platform её перекрывает, а plugins build без флага собирает под свою машину. Со старым сервером, который платформу не сообщает, publish предупреждает и собирает как раньше. Проверено: build --platform linux/amd64 на Mac даёт x86-64 бинарник с тем же sha, что и сборка через DOCKER_DEFAULT_PLATFORM, без флага — arm64; тесты на хендлер, SDK, аргументы docker и выбор платформы.

🤖 Generated with Claude Code

A plugin binary runs inside the service, but plugins publish built it for
whatever machine ran the build: from a Mac that was arm64, and an amd64
service cannot execute it. The smoke test ran it on the same Mac, so nothing
caught it.

PluginsResponse gains platform — the server's GOOS/GOARCH — and the SDK a
Platform method that reads it. publish asks for it after preflight and passes
it to docker build and to the smoke run, which emulates when needed.
--platform overrides it, on build and publish alike. A server older than
v1.3.0 reports nothing; publish then warns and builds for the local machine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ZergsLaw
ZergsLaw merged commit 0df1a71 into master Oct 30, 2026
12 checks passed
@ZergsLaw
ZergsLaw deleted the feat/publish-builds-for-server-platform branch October 30, 2026 18:00
@ZergsLaw ZergsLaw mentioned this pull request Oct 30, 2026
ZergsLaw added a commit that referenced this pull request Oct 30, 2026
plugins publish builds and smoke-tests for the platform the service reports in
the new PluginsResponse.platform field, or --platform (#51), and packs plugins
reproducibly, so an unchanged rebuild is an identical archive that is not
uploaded again (#50).

Co-authored-by: Edgar Sipki <e.sipki@uzum.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant