chore(release): plugin-version discipline (workflow#758)#26
Merged
Conversation
- Delete .github/workflows/sync-plugin-version.yml (sync mechanism retired;
goreleaser before-hook + binary ldflag carry release-tag truth)
- plugin.json.version → "0.0.0" (sentinel; flat M.m.p parses through
PluginManifest.ParseSemver without prerelease)
- plugin.json.minEngineVersion → 0.61.0 (requires sdk.ResolveBuildVersion +
IaCServeOptions.BuildVersion landed in workflow v0.61.0)
- plugin.json.downloads: switch archive-name shape from
workflow-plugin-aws_VERSION_OS_ARCH.tar.gz to
workflow-plugin-aws-OS-ARCH.tar.gz to mirror canonical DO pattern (the
release tag is now embedded only in /releases/download/<tag>/ path; the
archive filename no longer carries the version)
- cmd/workflow-plugin-aws/main.go: pass sdk.ResolveBuildVersion(internal.Version)
to IaCServeOptions.BuildVersion; binary's runtime version surfaces via
GetManifest RPC even when committed plugin.json shows the sentinel
- provider.ProviderVersion: convert const → var so the goreleaser
-ldflags -X override can take effect (const is build-time, not link-time);
default sentinel "dev" applies in unit tests
- internal.Version = "dev": new var so the second goreleaser ldflag (which
was previously dead-referencing a nonexistent symbol) drives the runtime
version surfaced via sdk.ResolveBuildVersion
- .goreleaser.yaml: adopt the canonical .release/plugin.json rewrite pattern
(rm -rf .release; cp + sed for version + tag-path; wfctl plugin validate
--strict-contracts pre-build); archive name_template flattened to
{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}; src/dst remap of
.release/plugin.json → plugin.json inside the tarball
- release.yml: setup-wfctl@v1 pinned to v0.61.0 + pre-build wfctl plugin
validate-contract --for-publish + post-build --release-dir verification;
go-version sourced from go.mod (was hardcoded "stable")
- ci.yml: bump strict-contracts wfctl pin v0.20.1 → v0.61.0 (v0.20.1
cannot validate the new 0.0.0 sentinel + 0.61.0 minEngineVersion)
- Bump workflow pin v0.57.0 → v0.61.0
- provider/provider_test.go: stop asserting hardcoded "1.0.0" version
string; compare against provider.ProviderVersion (sentinel "dev" in
tests, tag at release time)
Rollback: revert PR; restores prior sync mechanism + workflow pin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Per workflow#758 Layer 3 — mechanical migration mirroring the canonical DO plugin pattern shipped at GoCodeAlone/workflow-plugin-digitalocean#165.
.github/workflows/sync-plugin-version.yml— sync mechanism retired; goreleaser before-hook + binary ldflag carry release-tag truth.plugin.json.version→"0.0.0"sentinel (flat M.m.p, ParseSemver-compatible).plugin.json.minEngineVersion→0.61.0(requiressdk.ResolveBuildVersion+IaCServeOptions.BuildVersionfrom workflow v0.61.0).plugin.json.downloads: archive-name shape switched fromworkflow-plugin-aws_VERSION_OS_ARCH.tar.gz→workflow-plugin-aws-OS-ARCH.tar.gzto mirror DO. Release tag now embedded only in/releases/download/<tag>/path; filename no longer carries version.cmd/workflow-plugin-aws/main.go: passessdk.ResolveBuildVersion(internal.Version)toIaCServeOptions.BuildVersion. Binary runtime version surfaces via GetManifest RPC even when committed plugin.json shows the sentinel.provider.ProviderVersion:const→varso the-ldflags -Xoverride actually takes effect (const is build-time, not link-time). Default"dev"in unit tests.internal.Version = "dev": new var so the second goreleaser ldflag drives the runtime version surfaced viasdk.ResolveBuildVersion(previously dead-referencing a nonexistent symbol)..goreleaser.yaml: adopt canonical.release/plugin.jsonrewrite pattern (rm + cp + sed for version + tag-path;wfctl plugin validate --strict-contractspre-build). Archivename_templateflattened to{{ .ProjectName }}-{{ .Os }}-{{ .Arch }}.release.yml:setup-wfctl@v1pinned tov0.61.0+ pre-buildwfctl plugin validate-contract --for-publish+ post-build--release-dirverification.ci.yml: bump strict-contracts wfctl pinv0.20.1 → v0.61.0(v0.20.1 cannot validate the new sentinel + minEngineVersion).v0.57.0 → v0.61.0.provider/provider_test.go: stop asserting hardcoded"1.0.0"; compare againstprovider.ProviderVersion.Test plan
GOWORK=off go build ./...— greenGOWORK=off go test ./... -count=1— all greenwfctl plugin validate-contract .— PASSwfctl plugin validate-contract --for-publish --tag v0.0.1 .— PASSPer-repo variance vs DO
provider.ProviderVersion+internal.Version) instead of one — both retained per existing goreleaser config;internal.Versionis the one consumed bysdk.ResolveBuildVersion.provider.ProviderVersionhad to be converted fromconst→var(DO never had a const).internal.Versiondid not exist; added..goreleaser.yamlretainswindowsGOOS (DO is linux+darwin only).TestPluginDownloadsMatchGoReleaserArchivesURL-vs-version test, so no test retirement was required (host_conformance_test.go is module/step parity only — orthogonal).Rollback
Revert PR. Restores sync workflow + workflow pin + version string. Pure-additive forward; revert is clean.
🤖 Generated with Claude Code