fix(chartvalidator): should not produce 'no kind' warning on empty manifests #12
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.
This pull request primarily improves the robustness and test coverage of the image extraction logic in the Helm chart validator, especially for multi-document YAML files and real-world Kubernetes manifests. The most significant change is the addition of comprehensive tests to ensure correct image extraction from complex manifests, as well as a small enhancement to gracefully handle empty YAML documents. There are also some minor code cleanups.
Enhancements to image extraction robustness and test coverage:
engine_image_extraction_test.goto verify correct image extraction from multi-document YAML files, real-world Helm chart outputs (such as the Traefik example), and manifests containing a mix of workload and non-workload resources. These tests ensure only relevant images are extracted and full registry paths are preserved.extractImageFromManifestinengine_image_extraction.goto gracefully skip empty YAML documents, preventing errors when encountering comment-only or blank sections in multi-document files.Minor code cleanup:
getJobCountfunction and associated import ofruntimefromutils.go. [1] [2]engine_image_extraction.goandengine_image_extraction_test.gofor code clarity. [1] [2] [3] [4] [5] [6] [7] [8] [9]These changes collectively improve the reliability and maintainability of the image extraction engine, especially for real-world Kubernetes workloads.