Skip to content

Deploy checklist: report which operated components a release changed (#1444) - #1446

Merged
scttfrdmn merged 4 commits into
mainfrom
feat/1444-deploy-checklist
Oct 30, 2026
Merged

scttfrdmn merged 4 commits into
mainfrom
feat/1444-deploy-checklist

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Fixes #1444

Part 1 of the approved design: detection only. Part 2, the approval-gated deploy, is #1445. Its input is this tool's --json (schema 1). #1445 should auto-deploy only Lambdas with status: changed and deploy_kind: code-only, using functions and build.

What it does

scripts/deploychecklist (also make deploy-checklist FROM=... TO=...) reads both refs with git archive, so the working tree is never touched. It makes no AWS calls.

  • Lambdas. They are discovered from the deploy mechanisms using the same three rules as scripts/lambda-deploy-census.sh: SAM lambda/*/template.yaml, any *.sh that runs aws lambda create-function|update-function-code, and Go deploys. Nothing is hardcoded. For each Lambda the tool compares, between the two refs:

    • the repo files go list -deps says are compiled in, which can live in its own module or its replace ../.. parent. That includes non-test Go, cgo/asm and //go:embed files, built with the GOOS, GOARCH and -tags parsed from that mechanism's own go build line;
    • the third-party module versions it links. This is used instead of the raw go.mod/go.sum diff (see below);
    • the main module's go directive;
    • the deploy script, template or Makefile, plus any file they read that nothing else deploys.
  • Other deploy inputs. Each is its own manual line item, again found by rule rather than from a list:

    • scripts that make a control-plane change, matched at a command position (IAM, Lambda event-source mappings, DynamoDB tables and streams, API Gateway, Route 53, KMS, S3 bucket config, CloudFormation);
    • CloudFormation/SAM templates;
    • file:// documents those scripts apply;
    • scripts that run any of those.

    DynamoDB item writes (backfills) and EC2/EFS/FSx workload calls (smoke tests) are excluded.

  • Kinds. code-only means only compiled inputs changed. manual means anything else changed. A first deploy is added and a teardown is removed, both manual.

  • Errors. The tool fails loudly rather than guessing in three cases: a package error from go list -e, a deploy script it cannot map to a package, or two mechanisms building one package for different targets.

Release integration. There is a new deploy-checklist job in release.yaml.

  • Can't block the release. It has no needs and continue-on-error: true, so it cannot block or reorder the release (spored publish, verify, GoReleaser).
  • Where it posts. It writes the markdown to the job summary and the JSON to the log, then comments on the release PR. The PR is the one merged PR whose merge_commit_sha is the tagged commit; checked against the API, that is Release v0.151.0 #1440 for v0.151.0 and Release v0.150.0 #1432 for v0.150.0. If there isn't exactly one, the job warns and leaves the checklist in the summary.
  • Why not the release notes. GoReleaser creates and writes that body late, in the other job. Editing it would race GoReleaser and need contents: write.
  • Permissions. The only new permission is pull-requests: write on this job's GITHUB_TOKEN. There are no AWS credentials and no new secrets.

Why module versions instead of go.mod/go.sum. Every nested module is tidy, so any dependency change that reaches a binary shows up as a version change. A raw diff of the root go.mod would instead mark pipeline-orchestrator, which lives in the root module, as changed on every Dependabot bump, even for modules it never links.

Other files touched.

  • release_builds_test.go: the walk now stops at nested modules. The test is about commands "in this module", and scripts/ is a separate module whose tool is go run by the release workflow.
  • internal/iamcoverage/principals_test.go: adds scripts/deploychecklist as a non-principal, since it calls no AWS API.

Output for v0.150.0..v0.151.0

Deploy checklist: v0.150.0..v0.151.0

Operated components whose deploy inputs differ between v0.150.0 (ed74003) and v0.151.0 (0fad91e), from scripts/deploychecklist (#1444). code-only: only compiled inputs changed, so a code update ships it. manual: a script, template, policy or mapping changed; review and apply it by hand. Deploy from a clean checkout of v0.151.0. How to read this: docs/infra-account.md, "Deploy checklist".

Lambdas (4 of 9 need a deploy)

  • lambda/dashboard-api (spawn-dashboard-api): changed, code-only
    • compiles lambda/dashboard-api: models.go
    • deploy (shell): (cd lambda/dashboard-api && ./deploy.sh [aws-profile])
    • deploy (shell): lambda/dashboard-api/scripts/deploy.sh
  • lambda/dashboard-websocket-processor (spawn-dashboard-websocket-processor): changed, code-only
    • compiles lambda/dashboard-websocket-processor: main.go
    • deploy (shell): (cd lambda/dashboard-websocket-processor && ./deploy.sh <aws-profile> <websocket-api-id>)
  • lambda/pipeline-orchestrator (spawn-pipeline-orchestrator): changed, code-only
    • compiles pkg/aws: client.go, nested_spawn.go, private_network.go (added)
    • deploy (sam): make -C lambda/pipeline-orchestrator deploy
  • lambda/sweep-orchestrator (spawn-sweep-orchestrator): changed, code-only
    • compiles pkg/aws: client.go, nested_spawn.go, private_network.go (added)
    • compiles pkg/launcher: provision.go
    • deploy (shell): scripts/deploy-sweep-orchestrator.sh

Unchanged, no deploy: lambda/cost-history-collector, lambda/dashboard-websocket, lambda/dns-updater, lambda/scheduler-handler, lambda/ttl-reaper.

Other deploy inputs (4 of 26 changed, all manual)

  • lambda/dashboard-api/scripts/setup-all.sh [lambda/dashboard-api]: changed. runs lambda/dashboard-api/scripts/setup-dashboard-api-gateway.sh, lambda/dashboard-api/scripts/setup-dashboard-domain.sh
    • run: (cd lambda/dashboard-api/scripts && ./setup-all.sh [aws-profile])
  • lambda/dashboard-api/scripts/setup-dashboard-lambda-role.sh [lambda/dashboard-api]: changed. runs aws iam attach-role-policy, aws iam create-role, aws iam delete-policy, aws iam delete-policy-version, aws iam delete-role-policy, aws iam detach-role-policy, aws iam put-role-policy
    • run: (cd lambda/dashboard-api && scripts/setup-dashboard-lambda-role.sh [aws-profile])
  • lambda/dashboard-websocket/scripts/enable-streams.sh [lambda/dashboard-websocket]: changed. runs aws dynamodb update-table
    • run: (cd lambda/dashboard-websocket/scripts && ./enable-streams.sh <aws-profile>)
  • lambda/dashboard-websocket/scripts/setup-event-source-mappings.sh [lambda/dashboard-websocket]: changed. runs aws lambda create-event-source-mapping, aws lambda delete-event-source-mapping
    • run: (cd lambda/dashboard-websocket/scripts && ./setup-event-source-mappings.sh <aws-profile>)

Shipped with the CLI, no deploy

  • pkg/reaperdeploy: creates a Lambda from Go inside the spawn CLI (the self-hosted reaper, in the user's own account), so it ships with the CLI release, not as a spore.host deploy

Against the PR #1440 deploy record:

  • Deployed.
    • The role script, the mapping script and ws-processor were deployed: all three are flagged.
    • Both orchestrators were redeployed later to match version stamps: both are flagged code-only, through pkg/aws, plus pkg/launcher for sweep. This is the case the first manual pass missed.
  • Not deployed.
    • The reaper: reported unchanged.
    • dashboard-api: flagged code-only because models.go changed. The owner judged it behaviour-neutral, and the tool can't make that judgment.
  • Changed, but nothing to apply. enable-streams.sh and setup-all.sh changed, but neither needed applying: they only dropped the deleted autoscale table and backfill step.

Gates (each watched failing against a compiling revert)

revert failing test
compiled set includes TestGoFiles TestSyntheticRelease: reaper changed, due to other_test.go and main_test.go
compare every file in each package dir (git diff -- dir), docs included TestSyntheticRelease: reaper changed, due to README.md
only files under the Lambda's own dir (the v0.151.0 git diff -- lambda/ mistake) TestV0151IsTheReleaseThatMotivatedThis (both orchestrators unchanged) and TestSyntheticRelease
shell-deploy discovery scoped to lambda/ (the #799 shape) TestDiscoveryAgreesWithTheCensus (4 scripts/deploy-*.sh missing) and TestANewDeployMechanismIsSeenOrRefused
drop the go list package-error refusal TestAPackageErrorIsNotUnchanged
absorb scripts a deploy script mentions into its mechanism TestV0151…: dashboard-api becomes manual, and the role script is no longer its own line item

TestV0151… needs the real tags. CI's shallow checkout has none, so it skips there, and TestSyntheticRelease covers the same shapes with a temp git repo. While writing this, the census flagged a comment in discover.go that spelled the Go SDK call. The census's Go-deploy discovery matches raw text, comments included. The comment is reworded.

Checks

  • make check (from /private/tmp): pass
  • make lint: 0 issues in all 10 modules
  • scripts/nested-modules.sh: pass
  • semgrep scan --config=auto --error .: clean
  • actionlint on release.yaml: clean
  • make check-docs: pass
  • Help text: unchanged

@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit b3b8736 into main Oct 30, 2026
9 checks passed
@scttfrdmn
scttfrdmn deleted the feat/1444-deploy-checklist branch October 30, 2026 19:55
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.

Release does not deploy the operated Lambdas: detect which components a release changed, and auto-deploy code-only changes

1 participant