'test' command delete my spread.yaml
Metadata
Current evaluation
Closed stale with no direct fix after the workaround was deferred pending canonical/spread#225; later #1029 (93c27ec5) made invalid spread.yaml fail early.
Resolution: closed stale
Reason: After the maintainer said removing the unsafe replacement should wait for canonical/spread#225, #704 received no linked resolution and aged closed. A later independent change, #1029 (93c27ec5), addressed the failure mode by validating spread.yaml early.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
An error during `testing.process_spread_yaml()` makes the application remove my project's spread.yaml
### To Reproduce
have a bad spread.yaml and run `crafttool test`
### part yaml
```shell
n/a
```
### Relevant log output
```shell
2025-03-27 15:54:24.950 Traceback (most recent call last):
2025-03-27 15:54:24.950 File "/snap/fakecraft/x1/lib/python3.12/site-packages/craft_application/commands/lifecycle.py", line 480, in _run
2025-03-27 15:54:24.950 self._services.testing.process_spread_yaml(dest)
2025-03-27 15:54:24.950 File "/snap/fakecraft/x1/lib/python3.12/site-packages/craft_application/services/testing.py", line 46, in process_spread_yaml
2025-03-27 15:54:24.950 simple = models.CraftSpreadYaml.unmarshal(data)
2025-03-27 15:54:24.950 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-03-27 15:54:24.950 File "/snap/fakecraft/x1/lib/python3.12/site-packages/craft_application/models/base.py", line 62, in unmarshal
2025-03-27 15:54:24.950 return cls.model_validate(data)
2025-03-27 15:54:24.950 ^^^^^^^^^^^^^^^^^^^^^^^^
2025-03-27 15:54:24.950 File "/snap/fakecraft/x1/lib/python3.12/site-packages/pydantic/main.py", line 693, in model_validate
2025-03-27 15:54:24.950 return cls.__pydantic_validator__.validate_python(
2025-03-27 15:54:24.950 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-03-27 15:54:24.950 pydantic_core._pydantic_core.ValidationError: 1 validation error for CraftSpreadYaml
2025-03-27 15:54:24.950 backends
2025-03-27 15:54:24.950 Field required [type=missing, input_value={'project': 'c-lib-tests'...h': '/home/spread/proj'}, input_type=dict]
2025-03-27 15:54:24.950 For further information visit https://errors.pydantic.dev/2.11/v/missing
2025-03-27 15:54:24.950
2025-03-27 15:54:24.950 During handling of the above exception, another exception occurred:
2025-03-27 15:54:24.950 Traceback (most recent call last):
2025-03-27 15:54:24.950 File "/snap/fakecraft/x1/lib/python3.12/site-packages/craft_application/application.py", line 613, in run
2025-03-27 15:54:24.950 return_code = self._run_inner()
2025-03-27 15:54:24.950 ^^^^^^^^^^^^^^^^^
2025-03-27 15:54:24.950 File "/snap/fakecraft/x1/lib/python3.12/site-packages/craft_application/application.py", line 592, in _run_inner
2025-03-27 15:54:24.950 return_code = dispatcher.run() or os.EX_OK
2025-03-27 15:54:24.950 ^^^^^^^^^^^^^^^^
2025-03-27 15:54:24.950 File "/snap/fakecraft/x1/lib/python3.12/site-packages/craft_cli/dispatcher.py", line 527, in run
2025-03-27 15:54:24.950 return self._loaded_command.run(self._parsed_command_args)
2025-03-27 15:54:24.950 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-03-27 15:54:24.950 File "/snap/fakecraft/x1/lib/python3.12/site-packages/craft_application/commands/base.py", line 199, in run
2025-03-27 15:54:24.950 result = self._run(parsed_args, **kwargs) or result
2025-03-27 15:54:24.950 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-03-27 15:54:24.950 File "/snap/fakecraft/x1/lib/python3.12/site-packages/craft_application/commands/lifecycle.py", line 494, in _run
2025-03-27 15:54:24.950 spread_path.hardlink_to(spread_backup)
2025-03-27 15:54:24.950 File "/snap/fakecraft/current/usr/lib/python3.12/pathlib.py", line 1398, in hardlink_to
2025-03-27 15:54:24.950 os.link(target, self)
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed stale | Closed stale with no direct fix after the workaround was deferred pending canonical/spread#225; later #1029 (93c27ec5) made invalid spread.yaml fail early. | |
| stealth/space-bunny-alpha | — | closed stale | Closed without a direct fix; removal of the unsafe spread.yaml replacement was deferred pending spread#225. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without a fix. Resolution deferred pending prioritization and a related upstream change to remove the problematic spread.yaml replacement logic. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed pending prioritization. Resolution involves merging canonical/spread#225 to remove the problematic spread.yaml replacement logic causing deletion on validation errors. No direct patch applied. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without a direct fix. Resolution involves merging a fix for canonical/spread#225 to eliminate the current workaround that replaces spread.yaml, with prioritization discussions noted. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed. Resolved by merging a fix to eliminate the spread.yaml replacement workaround, preventing deletion during validation errors. |
Update history
No update history recorded yet.
Related work
-
Blocked By:
spread#225
(confidence 98%)
The maintainer identified this upstream fix as the prerequisite for removing the replacement workaround.
-
Likely Fixed By:
canonical/craft-application#1029
(confidence 90%)
Commit 93c27ec5 made invalid spread.yaml fail before the destructive test setup.
Related issues
No related issues found above the similarity threshold.