Skip to content

e2e: the documented campaign cleanup fails partway and leaves the campaign broken #109

Description

@lobennett

CONTRIBUTORS.md and the hint run_in_podman.sh prints both say to reclaim the workdir with:

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:

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.

Metadata

Metadata

Assignees

Labels

automationDeployment glue: deploy pattern, ledger, scripts

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions