Skip to content

Only ttl-reaper gates that template parameters are actually passed; autoscale and pipeline have no tests at all #776

Closed

Description

@scttfrdmn

Found while adding parameters to two SAM templates in one evening and noticing
only one of them pushed back.

What

lambda/ttl-reaper has TestEveryTemplateParameterIsInThePARAMMAP, which fails
when a template declares a parameter the Makefile never passes:

deploy_params_test.go:362: template parameter LogRetentionDays is not in the
Makefile's PARAM_MAP — `make deploy LogRetentionDays=…` would be silently ignored

lambda/autoscale-orchestrator and lambda/pipeline-orchestrator have no
tests at all
, so nothing equivalent protects them. Neither has a *_test.go.

Why it matters, demonstrated twice tonight

The failure mode is specific and silent: a parameter that exists in the template
but is never passed takes its default on every deploy, and an operator
supplying it on the command line is ignored without a word.

Suggested

Port TestEveryTemplateParameterIsInThePARAMMAP to the two modules that lack it.
It is not a straight copy: ttl-reaper passes parameters via a merged
.deploy-params.yaml built from PARAM_MAP, while autoscale and pipeline use an
inline --parameter-overrides string. So the check wants to parse the Makefile's
--parameter-overrides line instead of a PARAM_MAP variable.

Worth considering whether it belongs as one test over lambda/*/ in the root
module rather than three copies — the two deploy styles are the only real
variation, and a single test could handle both while covering any Lambda added
later. That is the shape scripts/lambda-deploy-census.sh (#654/#653) already
uses for the version and retention properties, and it exists precisely because
per-module checks miss the module nobody added one to.

Related: #770 (where the existing gate earned its keep), #772 (the parameters
that had no gate), #654 (the census that enumerates rather than per-module).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions