capture: an absent RESOURCE reports as 15 missing names — the D-237 bug, one level deeper #18
Labels
No labels
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-triage
ready
release
scope:apply
scope:capture
scope:coolify-api
scope:fleet
scope:manifest
scope:secrets
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/cast#18
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happened
cast captureagainst a hand-built box, pointed at the right project and theright environment, reported every single required name as individually
missing:
The source box is serving production right now. It is sending mail through
Mailgun as we speak — it obviously has
MAILGUN_API_KEY. Nothing was missing.cast never found the resources. It looked for the manifest's apps (
core,umami) inside the project, the source box names them something else, and everyper-name lookup therefore came back empty. Fifteen of fifteen "missing" is the
signature of a wrong lookup, not a finding about content.
Why this matters more than it looks
The suggested remedy makes it worse.
--overridefor all 15 names would have"worked": the operator hand-supplies every secret through
$CAST_CAPTURE_<NAME>, capture writes a perfectly valid store, and theresource-name mismatch — a real, reportable difference between the manifest and
the source — is never discovered. The tool would have talked the operator into
hand-carrying the exact data it exists to stop them from hand-carrying, and
buried the actual finding.
This is the same class of bug #12/D-237 fixed — an absent target reading back
as an empty one — just one level deeper in the tree. #12 closed the project and
environment axes. The resource axis is still open, and it fails in the same
way: silently, plausibly, with a clean-looking report.
Proposal
capture(anddiff) must distinguish "the resource does not exist" from"the resource exists and lacks this variable" — and refuse on the former,
naming what does exist:
Only once the resource is found should per-name MISSING be reported — at which
point it means what it says, and
--overrideis the right remedy.Ideally the same refusal should suggest the fix: a resource-name mapping (or
--project-style flag), so a source whose app is calledincubator-stackcan beread by a manifest that calls it
core.Acceptance
the resources that do exist on the source.
MISSINGis only ever reported for resources that were actuallyfound.
--override-ing everyname.