e2e: the documented campaign cleanup fails partway and leaves the campaign broken
- Dominant language
- Python
- Stars
- 1
- Forks
- 4
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 24
Description
`CONTRIBUTORS.md` and the hint `run_in_podman.sh` prints both say to reclaim the workdir with:
```bash
rm -rf $MECHABABS_E2E_WORKDIR/dev-campaign-* $MECHABABS_E2E_WORKDIR/test-campaign-*
```
That command cannot finish. On six campaigns left by an afternoon of e2e runs it stopped with a wall of `Permission denied` / `Directory not empty`, 4.3 GB still on disk:
```
rm: …/derivatives/SimBIDS-0.0.3+chain/containers/.git/annex/objects/pg/2g/MD5E-s344334336--…: Permission denied
rm: …/derivatives/SimBIDS-0.0.3+chain/containers/.git/annex/objects/pg/2g: Directory not empty
rm: …/derivatives/SimBIDS-0.0.3+chain/containers/.git/annex/objects: Directory not empty
```
**Cause:** git-annex stores its object files read-only **and drops write permission on their parent directories**, so `rm` cannot unlink them. Everything else deletes first, so the campaign is left present but gutted — worse than either clean outcome.
**Fix:** restore write permission first:
```bash
chmod -R u+w $MECHABABS_E2E_WORKDIR/dev-campaign-* $MECHABABS_E2E_WORKDIR/test-campaign-*
rm -rf $MECHABABS_E2E_WORKDIR/dev-campaign-* $MECHABABS_E2E_WORKDIR/test-campaign-*
```
Two places say it: the `CONTRIBUTORS.md` cleanup block and the stale-campaign hint the script prints at startup. Both landed with #104.
Matters more now that #105 is fixed — aborting a run mid-flight is exactly what leaves a half-built campaign behind.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.