Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make operations atomic: temp dirs? #29

Open
derhuerst opened this issue Jun 17, 2021 · 0 comments
Open

make operations atomic: temp dirs? #29

derhuerst opened this issue Jun 17, 2021 · 0 comments

Comments

@derhuerst
Copy link
Contributor

Currently, many operations in this project work inside directory within data. If they fail, make doesn't delete them (AFAIK it only does that with files), so a broken artefact is left behind. Because the subsequent operation doesn't (or can't even) check the directory's integrity, the whole pipeline produces subtly broken artefacts.

One possible solution is to make all operations atomic, by letting each

  1. create a temp dir
  2. work within this tmp dir, e.g. produce the artefact
  3. mv the temp dir to the desired location.

Another option would be to get make to delete directories on failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant