feat: add robust error-on-missing-globs configuration #5455
issues #5455.
This PR introduces the error-on-missing-globs flag, allowing users to configure Pixi to halt task execution with an error instead of a soft warning when input or output globs match no files.
Key Changes:
pixi_manifest/src/task.rs: Added the newerror_on_missing_globsboolean flag to theExecutetask definition, serialized appropriately inkebab-case.pixi_config/src/lib.rs: Addederror_on_missing_globsfield to the globalConfigstruct (accessible under[project]or[workspace]), including merging precedence logic.pixi_task&pixi_cli: Transformedwarn_on_missing_globsintocheck_missing_globswhich evaluates the new flag logic dynamically, returning an explicit fatalmiette::Resulterror to effectively bubble up failure when glob resolutions strictly yield 0 hits.- Unit Test Coverage: Added a comprehensive unit test in
pixi_task/src/executable_task.rsto rigorously ensurecheck_missing_globspanics accurately with the exact error string.
User Scenarios this supports:
With this configuration, users can now rigorously enforce checks for artifact presence, resolving instances where typoes in target blobs (such as inpt.txt vs input.txt) unexpectedly lead to tasks incorrectly performing downstream logic.
Your PR has failing CI. Please fix.
Hey @baszalmstra , Issue has been fixed and CI checks are passing successfully. Let me know if anything else needs improvement.
Hey @vikash7485, do you know when you could finish this?