Skip to content

fix(pipeline-orchestrator): three Makefile targets named a Lambda that does not exist - #762

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/754-pipeline-orchestrator-makefile
Oct 8, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/754-pipeline-orchestrator-makefile

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Fixes the real bug behind #754, whose stated premise was wrong.

The premise was wrong

#754 says the CloudFormation template for spawn-pipeline-orchestrator is not
in the repo. It is: lambda/pipeline-orchestrator/template.yaml, a SAM template
that matches the deployed stack resource-for-resource, including the IAM role
(implicitly, from its 7 Policies: entries — the live role carries
PipelineOrchestratorFunctionRolePolicy0…Policy6, which is SAM's generated
naming). make deploy already deploys it. Full correction is on the issue.

The real bug

Three targets named a function that has never existed:

target asked for reality
update-code spawn-pipeline-orchestrator-production ResourceNotFoundException
logs /aws/lambda/…-production only /aws/lambda/spawn-pipeline-orchestrator
invoke-test spawn-pipeline-orchestrator-production as update-code

template.yaml sets FunctionName: spawn-pipeline-orchestrator with no suffix,
and SAM has no say in it because the name is explicit. Environment names the
stack, never the function. Verified against the infra account:
list-functions returns only the unsuffixed name, and the only log group is the
unsuffixed one. So all three failed on a name rather than doing anything, and
always had.

The names now have one definition each (FUNCTION, STACK) at the top of the
file, so the Makefile and the template cannot drift apart again.

The trap that made it matter

update-code is a debug shortcut, not a deploy. CloudFormation treats the S3
object pinned in the template as the truth, so the next make deploy silently
reverts
whatever update-function-code pushed — no warning, no failure. That
is what #754 was really circling. The target now says so in a comment and at
runtime.

packaged.yaml

Removed. It is a genuine sam package output — I claimed otherwise on the issue
and corrected it — but from May, pinning an object matching neither the key the
stack held when #754 was filed nor the one live now, and nothing references
it
: make deploy passes --resolve-s3 and repackages every time. A stale
artifact that reads like an input is worse than no artifact.

Verification

make -n on all five targets, confirming every one expands to a name that was
checked against the live account. Repo-only change — no AWS call, no deploy.
Format, vet, -short tests, changelog gate, docs-drift gate and
semgrep --config=auto --error all clean locally.

Deliberately not in this PR

The live stack currently carries the expanded, Transform-less template,
because the #752 deploy submitted the template it had retrieved. Converging it
back to the SAM form should be a no-op on resources — all four logical IDs are
identical — but that is a prediction about a production stack, so it wants
sam deploy --no-execute-changeset and a read of the change set first. #754
stays open for it.

…t does not exist

`make update-code`, `make logs` and `make invoke-test` all asked for
`spawn-pipeline-orchestrator-production`. That function has never existed
in any account: template.yaml sets

    FunctionName: spawn-pipeline-orchestrator

with no environment suffix, and SAM has no say in it because the name is
explicit. Verified against the infra account — list-functions returns only
`spawn-pipeline-orchestrator`, get-function on the `-production` name is a
ResourceNotFoundException, and the only log group is
/aws/lambda/spawn-pipeline-orchestrator. So all three targets failed on a
name rather than doing anything, and always had.

`Environment` names the STACK, never the function. The function and stack
names now have a single definition each at the top of the Makefile, so the
Makefile and the template cannot drift apart again.

Also documents the trap that made this matter. `update-code` is a debug
shortcut, not a deploy: CloudFormation treats the S3 object pinned in the
template as the truth, so the next `make deploy` silently reverts whatever
update-function-code pushed — no warning, no failure. The target now says
so, in a comment and at runtime.

Removes `packaged.yaml`. It is a real `sam package` output, but from May,
pinning an object that matches neither the key the stack carried when #754
was filed nor the one live now, and nothing in the repo references it —
`make deploy` passes `--resolve-s3` and repackages every time. A stale
artifact that reads like an input is worse than no artifact.

Refs #754. The issue's premise — that no template for this stack exists in
the repo — is wrong and is corrected on the issue; template.yaml defines
every live resource, including the IAM role implicitly, and matches the
deployed stack resource-for-resource. Two items from the revised scope
remain: converging the live stack back to the SAM form, which touches
production and needs a reviewed change set first.
@codecov

codecov Bot commented Oct 8, 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 4dc05f5 into main Oct 8, 2026
7 checks passed
@scttfrdmn
scttfrdmn deleted the fix/754-pipeline-orchestrator-makefile branch October 8, 2026 20:03
scttfrdmn added a commit that referenced this pull request Oct 8, 2026
Promotes [Unreleased] to [0.126.0] and adds the compare link.

MINOR, not PATCH, because this release contains a breaking change to a
package other repos compile against: pkg/taskproto's three script
generators now take a WrapperOptions struct and return an error (#765/#764).
Pre-1.0 the project's rule is that a breaking change bumps MINOR.

Also in this release: the cross-repo API surface gate that will report the
next such change before it ships (#763/#679), `spawn logs` (#761), the
spored console log tail it reads (#759), the MPI peer-SSH readiness poll
(#758), and the remaining sleep-audit fixes plus the creation-stamp/orphan
reaper work (#752, #755, #756, #757, #762).

Release guard passed: both binaries report 0.126.0 for tag v0.126.0.
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