pixi icon indicating copy to clipboard operation
pixi copied to clipboard

feat: add robust error-on-missing-globs configuration #5455

Open vikash7485 opened this issue 9 months ago • 3 comments

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 new error_on_missing_globs boolean flag to the Execute task definition, serialized appropriately in kebab-case.
  • pixi_config/src/lib.rs: Added error_on_missing_globs field to the global Config struct (accessible under [project] or [workspace]), including merging precedence logic.
  • pixi_task & pixi_cli: Transformed warn_on_missing_globs into check_missing_globs which evaluates the new flag logic dynamically, returning an explicit fatal miette::Result error 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.rs to rigorously ensure check_missing_globs panics 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.

vikash7485 avatar Feb 20 '26 20:02 vikash7485

Your PR has failing CI. Please fix.

baszalmstra avatar Mar 17 '26 16:03 baszalmstra

Hey @baszalmstra , Issue has been fixed and CI checks are passing successfully. Let me know if anything else needs improvement.

vikash7485 avatar Mar 19 '26 08:03 vikash7485

Hey @vikash7485, do you know when you could finish this?

RaphaelRibes avatar May 17 '26 12:05 RaphaelRibes