Repository navigation
fix(spored): install the launching spawn's own spored from spawn/versions/<ver>/ (#1412) - #1416
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
scttfrdmn
force-pushed
the
fix/1412-pin-spored-version
branch
from
October 29, 2026 06:00
8941ec1 to
88c7df4
Compare
Merged
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 #1412
Every install path now installs the spored of the spawn that rendered it, from
spawn/versions/<ver>/spored-<os>-<arch>(plus.sha256and.sig, signature check unchanged): the same versionlauncher.CallerVersion/PublishedBodyVersionpins the bootstrap body to (#1274). Dev and unversioned builds keep the latest paths.Mechanism
pkg/sporedinstall: new shell functionspore_install_spored_from_buckets <binary> <regional-bucket> <fallback-bucket>, defined byVerifiedInstallFunc. WithSPAWN_SPORED_VERSIONset, the only sources are<regional>/spawn/versions/<v>then<us-east-1>/spawn/versions/<v>. There is no latest fallback, so a missing or unverifiable versioned object fails the install the same way a bad signature does. With it empty, the four latest sources apply, in the old order.PinScript(version)emits the single-quoted assignment, andReleaseVersionis now the one release regex (pkg/launcher uses it).launcher.SporedVersion()(new export, in api-snapshot) isPublishedBodyVersionwithout the key condition. The pin goes into the per-launch prefix, so the published body stays version-independent. The body bytes change once in this PR, as they do with any body edit.launcher.Provision. A library caller pins to the spawn module it was built against, the way its body already does.WindowsInstallScript(keyPEM, version)gets the versioned regional source, then us-east-1. Nothing is installed if neither verifies, the same as a bad signature.cmd/app.go, both templates: on failure they warn and keep the AMI's spored, as for a bad signature.make buildat a tag,""otherwise). The stage runner isspored run-pipeline-stage, so the two form one contract.applyVersionalready setslauncher.CallerVersion = Version, so they pin to the orchestrator's release.spawn upgrade-sporeduses the same function, pinned to its target.upgrade-sporednow defaults to this spawn's own version instead of the latest GitHub release. A dev build still asks GitHub. Reasons: it brings an instance to the CLI/spored pair this spawn ships and launches with; it needs no GitHub round-trip; and after Instance tags are spored's config file: move launch-fixed settings to a per-launch config object, keep tags for mutable/filterable state #1359 a spored newer than the instance's launching CLI may not read that CLI's config, so "latest" is the riskier default.--versionmust be MAJOR.MINOR.PATCH. It was rendered with%qinto double quotes, where$(...)expands. A default-target downgrade refusal now tells the user why.scripts/install-spored.ps1(standalone, no launching spawn) still installs the latest.Sizes
Bare launch, before → after:
Gates
Each was watched failing against a compiling revert:
pkg/sporedinstallTestAPinnedInstallFetchesOnlyItsOwnVersion,TestAPinnedInstallNeverFallsBackToLatest,TestAnUnpinnedInstallFetchesLatest(executed bash, request paths recorded)pkg/launcherTestAReleaseBootstrapInstallsItsOwnSpored(whole inline bootstrap in the boot sandbox: own spored installs, only-latest published retires with zero latest hits, dev installs latest)PinScript("")pkg/launcherTestTheSporedPinIsTheCallersRelease(rendered pin == CallerVersion ==SPAWN_BS_VERSION, assigned before the body; dev, pseudo and dirty builds unpinned)PinScript("")pkg/sporedinstallTestWindowsPinnedInstallFetchesOnlyItsOwnVersion(pwsh, fake aws records every s3 URL)cmdTestWindowsBootstrapInstallsThisSpawnsSporedlaunch_config.gopasses""cmddiscovery:TestEverySporedDownloaderUsesTheVerifiedInstaller(must call the bucket function, neverspore_install_verified_sporedwith its own bases, must emitPinScript),TestEveryVerifiedInstallCallerIsPinned(everyVerifiedInstallFunc()caller),TestEveryWindowsInstallPathIsPinned(everyWindowsInstallScriptcaller passeslauncher.SporedVersion())""cmdTestGeneratedAppUserDataInstallsSporedVerified+ dev variant,TestUpgradeScriptIsFailClosed(pin),TestUpgradeSporedDefaultsToThisSpawnsVersionPinScript("")/ default back to latestlambda/pipeline-orchestratorTestUserData_InstallsThisReleasesSpored(executed, every spored curl URL)PinScript("")lambda/sweep-orchestratorTestLegacyMemberInstallsTheOrchestratorsSporedRelease and deploy notes
go run . bootstrap-bodywithout ldflags (deploy-sweep-orchestrator.sh's check) still prints the published bytes.spawn/versions/<v>/and no longer atspawn/. The verify should sha- and sig-check the versioned copies too, plus an anonymous HTTPS fetch the way the instance does. The release's own upload is unchanged; it already writes the versioned objects.go version -m build/bootstrapshould showmod github.com/spore-host/spawn v0.X.Y, not a pseudo-version or+dirty, or it installs the latest.spawn/versions/<v>/(the stub fetches the body there).make check,make lint(0 issues, 10 modules),semgrep scan --config=auto --error .(0 findings),make api-snapshot,make gen-docsandcheck-docsall pass.