Skip to content

Skip non-workload documents instead of aborting the stream - #54

Open
MPV wants to merge 1 commit into
claude/stdin-multidocfrom
claude/skip-non-workloads
Open

Skip non-workload documents instead of aborting the stream#54
MPV wants to merge 1 commit into
claude/stdin-multidocfrom
claude/skip-non-workloads

Conversation

@MPV

@MPV MPV commented Jul 23, 2026

Copy link
Copy Markdown
Owner

What

Treat documents whose kind has no PodSpec (Service, ConfigMap, …) — and kinds not registered in the scheme (CRDs / custom resources) — as skippable: return no images and no error for them.

Why

Previously any such document made ProcessData return an error, which aborted the whole file and discarded images already collected from earlier documents. A single Service alongside real workloads produced no output at all.

Behavior change

Non-workload documents are skipped; images from surrounding workloads are preserved. A file/stream containing only non-workloads now succeeds with empty output rather than erroring.

How it reads in review

Because #59 made the suite approve stderr too (via the shared verify() helper), this behavior change lands as a golden diff: TestError becomes TestSkipsNonWorkloads, and its stderr golden goes from error processing document: unsupported kind Service → empty. TestMixed (also via verify()) covers a workload + Service + workload file.

Stack

Base: claude/stdin-multidoc (#49). Merge order: #59#49 → this → claude/robust-yaml-splitting (#56).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Pc6NAURAqjU4LYJx93tgSC

@MPV
MPV force-pushed the claude/skip-non-workloads branch from e896ac0 to 82b2362 Compare July 23, 2026 07:09
@MPV
MPV force-pushed the claude/stdin-multidoc branch from 8f215aa to 8696395 Compare July 23, 2026 08:17
@MPV
MPV force-pushed the claude/skip-non-workloads branch from 82b2362 to aad8d56 Compare July 23, 2026 08:17
@MPV
MPV force-pushed the claude/stdin-multidoc branch from 8696395 to 6e5fb8d Compare July 23, 2026 08:24
@MPV
MPV force-pushed the claude/skip-non-workloads branch from aad8d56 to aebe427 Compare July 23, 2026 08:52
@MPV
MPV force-pushed the claude/stdin-multidoc branch from 6e5fb8d to c2e30c5 Compare July 24, 2026 06:45
@MPV
MPV force-pushed the claude/skip-non-workloads branch from aebe427 to ab391dc Compare July 24, 2026 06:45
@MPV
MPV force-pushed the claude/stdin-multidoc branch from c2e30c5 to b19278d Compare August 2, 2026 08:00
Previously any document whose kind had no PodSpec (a Service, ConfigMap,
etc.) made ProcessData return an error, which aborted the whole file and
discarded images already collected from earlier documents. A single
Service alongside real workloads produced no output at all.

Treat non-workload kinds as skippable: return no images and no error for
them, and likewise for kinds not registered in the scheme (CRDs and other
custom resources). Images from the surrounding workloads are preserved.

The former TestError (which asserted a Service errored) becomes
TestSkipsNonWorkloads, and TestMixed covers a workload+Service+workload
file.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pc6NAURAqjU4LYJx93tgSC
@MPV
MPV force-pushed the claude/skip-non-workloads branch from ab391dc to 050d1ab Compare August 2, 2026 08:00
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.

2 participants