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

[FC-40974] SingleUntar: touch self.target on update #195

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Sep 26, 2024

Consider the following use-case:

  • self.target is an existing Git checkout at /mnt/nfs/shared/{project_code}
  • prebuilt assets are unpacked into a given directory in self.target (the exact directory is encoded in the archive, so self.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 of self.target isn't affected by the unpack since the files are unpacked into a directory inside self.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 called self.target.

FC-40974

Consider the following use-case:

* `self.target` is an existing Git checkout at
  `/mnt/nfs/shared/{project_code}`
* prebuilt assets are unpacked into a given directory in `self.target`
  (the exact directory is encoded in the archive, so `self.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 of
`self.target` isn't affected by the unpack since the files are unpacked
into a directory inside `self.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 called
`self.target`.
@Ma27 Ma27 merged commit ebda7c4 into master Oct 8, 2024
6 checks passed
@Ma27 Ma27 deleted the FC-40974-touch-singleuntar-target branch October 8, 2024 11:59
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

Successfully merging this pull request may close these issues.

2 participants