[FC-40974] SingleUntar: touch self.target
on update
#195
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Consider the following use-case:
self.target
is an existing Git checkout at/mnt/nfs/shared/{project_code}
self.target
(the exact directory is encoded in the archive, soself.target
is exactly the git checkout).Now, using
SingleUntar
isn't convergent in this case because it tries to unpack the assets on each deploy: this is because the mtime ofself.target
isn't affected by the unpack since the files are unpacked into a directory insideself.target
.The
self.touch
solves the issue by updating the mtime of the target.This is not expected to affect the "traditional" use-case of
SingleUntar
where a new unpack creates a new directory calledself.target
.