Skip to content

Conversation

@bosbaber
Copy link
Contributor

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:

  • Added new tests in engine_image_extraction_test.go to 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.
  • Updated extractImageFromManifest in engine_image_extraction.go to gracefully skip empty YAML documents, preventing errors when encountering comment-only or blank sections in multi-document files.

Minor code cleanup:

  • Removed unused getJobCount function and associated import of runtime from utils.go. [1] [2]
  • Removed extraneous blank lines in both engine_image_extraction.go and engine_image_extraction_test.go for 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.

@bosbaber bosbaber self-assigned this Dec 11, 2025
@bosbaber bosbaber merged commit a9928e8 into main Dec 11, 2025
3 checks passed
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