Repository navigation
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Oct 15, 2026
Plugins are Linux-only. Steps run through sh -c, su - <user> -c, nohup and tar. Every registry plugin in spore-host/spore-plugins declares conditions.remote platform os: linux. The as_user "local matching user" model is documented in spore-plugins CONCEPTS.md as Linux-only (a Windows spore has only Administrator). A PowerShell runner would need every plugin rewritten for Windows, so refuse instead: - plugin.CheckSporeOS / ErrWindowsSporeUnsupported: one shared check and message. - spawn plugin install: refuse a spawn:os=windows instance before the plugin is resolved or any local provision step runs. - spawn launch --plugin with a Windows target: refuse. The Windows bootstrap carries no plugin declarations, so the flag was silently dropped. - spored: Runtime.InstallWithProvenance refuses before recording state. The push API's install endpoint answers 501 with the reason, so an older spawn reports it. LoadFromDeclarations skips resolution. Step-executing pluginruntime tests skip on a Windows host. The refusal is tested on every OS by overriding hostGOOS. Documented in docs/windows-beta-guide.md and in spawn plugin install's help. (#1001)
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.
Fixes #1001
Decision: Windows spores do not support plugins
Evidence from the plugin spec and registry (spore-host/spore-plugins, read-only):
conditions.remote: [{type: platform, os: linux}]. Their steps are POSIX shell (systemctl,apt/dnf,curl | sh).runas "Execute a shell command", andextractis tar.as_userdepends on that model.A PowerShell runner wouldn't make any existing plugin work, because each one would have to be rewritten for Windows. So we refuse, and say why:
spawn plugin install --instance <windows spore>sh -cspawn:os=windowstagspawn launch --os windows --plugin X(also sweeps)POST /v1/plugins/installon WindowsAll four use one check and one message:
plugin.CheckSporeOS/plugin.ErrWindowsSporeUnsupported. The decision is also documented indocs/windows-beta-guide.md(new "Not available on Windows: plugins" section) and in thespawn plugin installhelp text (docs-gen/plugin.mdregenerated).An instance spawn can't resolve (a raw
user@host, or no AWS access) gets past the CLI guard. spored's own refusal covers that case.Tests
cmd/plugin_windows_spore_test.go:runPluginInstallwith a Windows-tagged instance (lookup injected viapluginInstanceLookup, no AWS) must returnErrWindowsSporeUnsupported, and must do so before resolving: the ref is a nonexistent./file, so a late or missing guard returns the resolve error instead. Linux, untagged and unresolvable instances pass the guard.windowsPluginGuardis covered too.pkg/pluginruntime/windows_spore_test.go(runs on every OS by overridinghostGOOS): Install refused, no step ran (marker file absent), no state saved. The push API returns 501 with the reason.LoadFromDeclarationsdoesn't call the resolver.pkg/plugin/spore_os_test.go: coversCheckSporeOS.shsteps now skip on a Windows host viaposixSporeOnly(t), because there's nothing to execute there.Checked against reverts that compile (each guard changed to
false && err != nil): all five refusal tests fail, with messages like= resolve plugin "./absent-plugin.yaml": … no such file,= <nil>,HTTP 202, want 501,a declaration was resolved on a Windows spore.Caveats
scripts/windows-test-skips.txtisn't onmainandpkg/pluginruntimecan't come off it in this PR. The package now refuses on Windows and its sh-based tests skip there. But the Windows-tagged runs have only been compiled and vetted (GOOS=windows go vet), never executed, so remove the skip entry only once a Windows CI run shows the package green.launch_single.go/launch_sweep.goare one line each. The guard is tested where it lives, not through a full launch.conditions.remoteis validated but never evaluated anywhere, so a plugin'stype: commandremote pre-flight is silently ignored.make check: everything passes except the known Docker-onlyTestGenerateWrapper_ChownFixesCrossUIDStickyUnlink_Docker.make check-nested: all 9 modules pass.GOOS=windows go vet ./...is clean except the pre-existingpkg/service/pkg/taskprototest-compile errors (#925, fixed by #941), which fail onmaintoo.