Repository navigation
fix: skip comment-only YAML documents during parsing - #3014
theakshaypant wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Explicit YAML document-end markers are still misclassified as content and can reproduce the decoding error.
Review effort: Balanced
Findings: 1
What changed in this PR
Skips comment-only YAML documents when resolving Tekton resources.
Changes:
- Adds YAML-content detection before decoding.
- Adds unit and E2E fixture coverage for comment-only documents.
| File | Description |
|---|---|
pkg/resolve/resolve.go |
Filters comment-only documents. |
pkg/resolve/resolve_test.go |
Tests comment-only document handling. |
test/testdata/always-good-pipelinerun.yaml |
Adds comment-only document coverage to shared E2E data. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3014 +/- ##
=======================================
Coverage 91.92% 91.92%
=======================================
Files 167 167
Lines 12913 12919 +6
=======================================
+ Hits 11870 11876 +6
Misses 1042 1042
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
458ac48 to
2192556
Compare
|
/paco review |
Paco Review 🔍This PR fixes a bug where YAML documents containing only comments (and no actual content) were being passed to the Kubernetes deserializer instead of being skipped. The fix introduces a Review difficulty: 2/5 (Easy) — Small, focused fix with a clear failure mode, limited blast radius, and straightforward logic. 1 new inline comment(s) found. Reviewed commit: 2192556 |
2192556 to
6ab00f2
Compare
Comment-only documents in concatenated .tekton files caused "Object 'Kind' is missing" errors, blocking valid PipelineRuns from executing. Skip these documents before decoding. Signed-off-by: Akshay Pant <akpant@redhat.com>
6ab00f2 to
fe6b4a7
Compare

📝 Description of the Change
Comment-only documents in concatenated .tekton files caused "Object 'Kind' is missing" errors, blocking valid PipelineRuns from executing. Skip these documents before decoding.
🔗 Linked GitHub Issue
N/A
🧪 Testing Strategy
🤖 AI Assistance
AI assistance can be used for various tasks, such as code generation,
documentation, or testing.
Please indicate whether you have used AI assistance
for this PR and provide details if applicable.
Important
Slop will be simply rejected, if you are using AI assistance you need to make sure you
understand the code generated and that it meets the project's standards. you
need at least know how to run the code and deploy it (if needed). See
startpaac to make it easy
to deploy and test your code changes.
If the majority of the code in this PR was generated by an AI, please add a
Co-authored-bytrailer to your commit message.For example:
Co-authored-by: Claude noreply@anthropic.com
✅ Submitter Checklist
fix:,feat:) matches the "Type of Change" I selected above.make testandmake lintlocally to check for and fix anyissues. For an efficient workflow, I have considered installing
pre-commit and running
pre-commit installtoautomate these checks.