feat: skip non-workload documents instead of aborting the stream - #54
Merged
Conversation
This was referenced Jul 23, 2026
MPV
force-pushed
the
claude/skip-non-workloads
branch
from
July 23, 2026 07:09
e896ac0 to
82b2362
Compare
MPV
force-pushed
the
claude/skip-non-workloads
branch
from
July 23, 2026 08:17
82b2362 to
aad8d56
Compare
This was referenced Jul 23, 2026
MPV
force-pushed
the
claude/skip-non-workloads
branch
from
July 23, 2026 08:52
aad8d56 to
aebe427
Compare
MPV
force-pushed
the
claude/skip-non-workloads
branch
from
July 24, 2026 06:45
aebe427 to
ab391dc
Compare
This was referenced Aug 2, 2026
MPV
force-pushed
the
claude/skip-non-workloads
branch
from
August 2, 2026 08:00
ab391dc to
050d1ab
Compare
MPV
force-pushed
the
claude/skip-non-workloads
branch
2 times, most recently
from
August 6, 2026 21:05
5388024 to
8d48f52
Compare
MPV
force-pushed
the
claude/skip-non-workloads
branch
from
August 6, 2026 21:52
8d48f52 to
d0e8ec8
Compare
MPV
force-pushed
the
claude/skip-non-workloads
branch
from
August 8, 2026 21:47
d0e8ec8 to
6e73d90
Compare
MPV
force-pushed
the
claude/skip-non-workloads
branch
from
August 8, 2026 22:05
6e73d90 to
cbd53a5
Compare
MPV
force-pushed
the
claude/skip-non-workloads
branch
from
August 8, 2026 22:19
cbd53a5 to
9521980
Compare
MPV
force-pushed
the
claude/skip-non-workloads
branch
from
August 8, 2026 22:21
9521980 to
b24a7da
Compare
MPV
force-pushed
the
claude/skip-non-workloads
branch
2 times, most recently
from
August 9, 2026 06:23
1d6517e to
73b485b
Compare
MPV
force-pushed
the
claude/skip-non-workloads
branch
2 times, most recently
from
August 9, 2026 06:39
4d73640 to
f4c722f
Compare
Any document whose kind has no PodSpec (a Service, ConfigMap, etc.) made ProcessData return an error, which aborted the whole file and discarded images already collected from earlier documents. Before: $ kir deployment-and-service.yaml error: error processing document: unsupported kind Service # exit 0, and the Deployment's image is lost After: $ kir deployment-and-service.yaml nginx:1.27 # the Service is skipped; surrounding workloads are preserved Treat non-workload kinds — and kinds not registered in the scheme (CRDs and other custom resources) — as skippable: no images, no error. In the golden suite the former TestError becomes TestSkipsNonWorkloads (Service now yields empty stderr) and TestMixed covers a workload + Service + workload file. Document the decision so the stderr/exit contract is explicit: a new docs/adr/0007-document-classification.md records the three-tier policy (workload / known image-less / unprocessable) and the planned "seen but not detected" warning for unrecognized CRDs (#75); the README summarizes it for users; and the yamlparser comments point back to the ADR. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pc6NAURAqjU4LYJx93tgSC
MPV
force-pushed
the
claude/skip-non-workloads
branch
from
August 9, 2026 06:47
f4c722f to
05b1e64
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Skip non-workload documents (Service, ConfigMap, CRDs, …) instead of erroring out the whole file.
Before → After
Why
Any document whose kind has no PodSpec made
ProcessDatareturn an error that aborted the file and discarded images already collected. Non-workload kinds — and kinds not registered in the scheme (CRDs) — are now skippable: no images, no error.Golden suite: the former
TestErrorbecomesTestSkipsNonWorkloads(Service → empty stderr, exit 0), andTestMixedcovers a workload + Service + workload file.Docs
Records the resulting document-classification contract so the stderr/exit behaviour is explicit rather than implied —
docs/adr/0007-document-classification.md(added to the ADR log from #76): the three tiers (workload → images, known image-less → skipped silently, unprocessable → stderr + non-zero), plus the plannedwarning:on stderr / exit 0 ("seen but not detected") for unrecognized CRDs (#75). The root README carries a short user-facing table, thedocs/adr/README.mdindex gains its0007row, and theyamlparser.gocomments point back to the ADR.The key decision: a valid-but-image-less document is not an error and not a warning — it's expected input with nothing to report, so stdout stays images-only and the exit code stays trustworthy (also what keeps a directory full of Services from tripping the non-zero exit in #55).
Stack / Release
Based on
master(rebased onto the #76 ADR backfill).feat:→ minor — tolerating mixed manifests is a new capability.🤖 Generated with Claude Code
https://claude.ai/code/session_01Pc6NAURAqjU4LYJx93tgSC