Feature or enhancement request details
Description
While reviewing the image management implementation in K8sHelper, I noticed that image reference parsing uses try? within isShortName and fqReference, silently swallowing parsing errors. Additionally, ensureImage handles .notFound errors specifically, but broader operational errors during image fetching or parsing could benefit from more robust validation and explicit logging to prevent unexpected behavior with malformed image references.
Proposed Changes
- Robust Error Handling: Improve error visibility during
Reference.parse failures instead of silently ignoring them with try?.
- Input Validation & Logging: Add stricter checks and informative debug/error logs for edge cases where image references are malformed or invalid.
- Error Categorization: Ensure
ensureImage catches and distinguishes other potential ContainerizationError types gracefully.
Benefit
This will improve the overall stability, diagnostic capability, and security posture of the container image management workflow.
I would love to submit a Pull Request addressing these improvements if this direction sounds good to the maintainers!
Code of Conduct
Feature or enhancement request details
Description
While reviewing the image management implementation in
K8sHelper, I noticed that image reference parsing usestry?withinisShortNameandfqReference, silently swallowing parsing errors. Additionally,ensureImagehandles.notFounderrors specifically, but broader operational errors during image fetching or parsing could benefit from more robust validation and explicit logging to prevent unexpected behavior with malformed image references.Proposed Changes
Reference.parsefailures instead of silently ignoring them withtry?.ensureImagecatches and distinguishes other potentialContainerizationErrortypes gracefully.Benefit
This will improve the overall stability, diagnostic capability, and security posture of the container image management workflow.
I would love to submit a Pull Request addressing these improvements if this direction sounds good to the maintainers!
Code of Conduct