dep-check asks Docker Hub about opsdeck:rig-base, an image that is only ever built locally #25
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?
Split out of the review of #23, where it was the one non-green line in the dry run. Unrelated to that PR's bumps.
Cause
docker/dev-rig/Dockerfile:10isFROM opsdeck:rig-base. That image does not come from a registry —docker/dev-rig/up.sh:56builds it fromdocker/Dockerfileand tags it locally, and nothing pushes it anywhere.Discovery walks every Dockerfile in the tree rather than reading a hardcoded list of two paths, deliberately (
discover.ts:357: a place nobody had listed is how a dependency went unwatched once already). So it finds this one,imageDependencysplitsopsdeck:rig-baseinto a name and a tag like any other reference, and the unqualified name resolves against Docker Hub, wherelibrary/opsdeckdoes not exist and anonymous auth answers 401.The tag is unversioned anyway, so even if the lookup succeeded there would be nothing to compare — the honest answer for this line is "not a dependency", not "up to date".
Arrived with #10, which brought
docker/dev-rig.What it does and does not break
It does not make the run red: the exit code is
failed || unwatched.length || unreachable === reports.length(main.ts:219), so one unreachable dependency out of eight still exits 0, and the weekly job and every PR's dry run stay green.What it costs is the property the tool is built around — a run that finds nothing writes nothing, so anything it does print is worth reading. This line prints on every run and can never be resolved, and a genuine registry outage on a real dependency prints the same shape of line. Noise that is permanent is noise that gets skipped.
Options
Not prescribing one; each trades differently:
FROM opsdeck:rig-basedistinguishes a locally built image from a registry one, so discovery cannot infer it — it would need a comment it reads, the way it already reads# v7.0.1on an action pin. Closest to the existing convention, and the marker is visible to the next reader of the Dockerfile.DEP_CHECK_IGNORE, or a field in the repo). Cheapest, and the one that ages worst: a list nobody looks at is the failure this whole arrangement exists to prevent, and an entry that outlives its Dockerfile silences a real dependency later.unwatchedwith a reason instead of an error. Reads correctly, butunwatched.lengthmakes the run exit 1, so this trades permanent noise for permanent red unlessunwatchedis first split into "cannot be watched, deliberately" and "should be watched, isn't".ARG BASE=opsdeck:rig-base/FROM ${BASE}. Discovery skips refs containing$(discover.ts:224) as operator indirection, so the line stops being a declaration at all. Smallest diff andup.shalready owns the build, but it makes the base implicit to someone reading the Dockerfile, and it works by side effect of a rule written for something else — which is the kind of thing that gets undone by a later cleanup that does not know it was load-bearing.Option 1 or 3 is where I would look first; 4 is a one-line fix if this only needs to stop being noise.