- Issue created by @sunilkansodiya
- Status changed to Postponed: needs info
over 1 year ago 3:19am 17 August 2023 - ๐บ๐ธUnited States cmlara
A responses to this had been posted in SLACK earlier in the day before this issue was opened.
https://drupal.slack.com/archives/C01SRAJN0FK/p1692216001835239Unlikely to be s3fs.
Probaly an upgrade hook or other module instructing Drupal core to delete the files.
S3fs just provides a file system, itโs up to other modules and core to request I/O on files.
Changing to a support request as there is no evidence at this time that this is an s3fs issue.
Postponing on awaiting more information as we need the reporter to advise what they have checked regarding their upgrade to indicate this might be an s3fs issue.
Priority to minor due to the issue being cross posted in multiple locations and the reporter directly contacting maintainers. - ๐ฎ๐ณIndia sunilkansodiya
Thank you cmlara.
Any one know how only Image Style is deleting when upgrading from drupal 8.3 to 8.9 ?
I have run drush updb only and found this issue.
- ๐ฎ๐ณIndia sunilkansodiya
I think what happened in my case:
Step-1: upgrade UAT env with 8.3 to 8.9
step-2: Taken production database into new host and connect with UAT code.
step-3 run drush updb and drus cr commands.
step-4 in this case, some files are still into 's3fs_file' table.
During cache clear, this table trying to find files on UAT environment /bucket and it was failed so these styles files are deleted.Still it is in investigation mode and trying to reproduce it. Could you please share your thoughts on it?
Due to cross env. it happened I think
- ๐บ๐ธUnited States cmlara
All of this sounds like 'as designed' for s3fs.
I can't accurately comment on what your upgrade is doing, this will all depend upon your specific site and could even be as specific as what version of a module you are upgrading from (as upgrade hooks are sequential). Even if these were a Drupal Core update hook changing them D8.4+ was released so long ago that that many of us would likely not be able to remember without referring to release notes or code.
Its highly recommended not to use a production bucket in a dev lab, and its also recommended not to use the same bucket on multiple sites because of the need to keep the s3fs_file table in sync.
Ultimately yes you could be on the right track regarding finding/not finding files from having an incomplete dev lab, or could be having other issues.
As noted s3fs just does what it is instructed regarding files, its up to whatever code chooses to call for deletion that would be responsible and where an issue would need to be opened if you feel the deletion is a bug.
- ๐ช๐ธSpain jansete
I agree with cmlara, working with image styles sometimes could be difficult. If you change a image style the default behaviour is delete all the image styles previously generated and if you use a external service like s3 could be a problem.
You can afford with some tricks, add temporary patches to core to avoid this or use queues to generated in background.
I'm sure that it will be more strategies depends on the problem.Regards.
- Status changed to Fixed
over 1 year ago 10:15pm 8 September 2023 - ๐บ๐ธUnited States cmlara
As it has been 2 weeks without additional details I'm assuming the advice previously given allowed for resolution. Marking Fixed.
Automatically closed - issue fixed for 2 weeks with no activity.