Skip to content

Add smoke_test_binaries.sh to validate plugin binaries pre-release πŸͺΏβœ¨ - #1813

Open
vzhang-stripe wants to merge 1 commit into
masterfrom
vzhang/github-action-validation-release
Open

Add smoke_test_binaries.sh to validate plugin binaries pre-release πŸͺΏβœ¨#1813
vzhang-stripe wants to merge 1 commit into
masterfrom
vzhang/github-action-validation-release

Conversation

@vzhang-stripe

Copy link
Copy Markdown
Contributor

Minion run

πŸ§‘β€πŸ’» Human Summary

πŸ€– LLM Summary

Reviewers

r? @
cc @stripe/developer-products

Summary

Adds scripts/smoke_test_binaries.sh, a portable, dependency-free bash script that validates a built plugin binary is a launchable HashiCorp go-plugin server before it is published. For each binary in a given directory it sets the plugin handshake env var (plugin_<shortname>, with the value read from the repo's .plugin file β€” matching the host CLI's MagicCookieKey in pkg/plugins/plugin.go), launches the binary, and confirms it emits the go-plugin handshake line before terminating it. Binaries built for a different OS than the current runner are skipped, and the script exits non-zero on any failure so a release workflow can gate publishing on it.

This is the shared, source-of-truth validation step from the plan; it is meant to be vendored/consumed by plugin release workflows and run between the build and publish steps.

Verified locally with shellcheck/bash -n and against a fake plugin binary: a valid binary passes (exit 0), a crashing binary fails (exit 1), and argument/.plugin/empty-dir/non-executable cases behave as expected.

Add a portable, dependency-free bash script that validates a built plugin
binary is a launchable HashiCorp go-plugin server before it is published.

For each binary in the given directory the script sets the plugin handshake
environment variable (plugin_<shortname>, value read from the repo's .plugin
file), launches the binary, and confirms it emits the go-plugin handshake
line before terminating it. Binaries built for a different OS than the
current runner are skipped, and the script exits non-zero on any failure so
a release workflow can gate publishing on it.

The script is intended to be shared/vendored by plugin release workflows and
run between the build and publish steps.

Committed-By-Agent: goose
@vzhang-stripe
vzhang-stripe requested review from a team as code owners July 21, 2026 17:43
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