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

Regorganise file migration task #219

Closed
maxime-rainville opened this issue Mar 12, 2019 · 2 comments
Closed

Regorganise file migration task #219

maxime-rainville opened this issue Mar 12, 2019 · 2 comments

Comments

@maxime-rainville
Copy link
Contributor

maxime-rainville commented Mar 12, 2019

We have been doing lots of file management work lately. This will potentially require projects upgrading from a minor release to 4.4 to take extra step to bring their assets back to the recommended structure.

Acceptance criteria

  • Developers can update to the latest asset structure by running a single unified task, whether they are upgrading from 3.x or a pre-4.4 minor release.
  • Unified task performs the following sub tasks:
    • Normalise DB File entries
    • Move files to the appropriate location
    • Find unknown files and adds matching DB entries
    • Generate thumbnails
    • Updates HTMLText references to files so they use short codes
  • The unified task works with legacy_filenames or keep_archive_assets enabled.
  • Developers can understand what the unified task does by reading the File Migration doc
  • Migration task works with 1000 files and images

Related issues

Notes

  • Refactor \SilverStripe\Assets\Flysystem\FlysystemAssetStore::parseFileID to use file utility class.
  • Consider if integration tests are appropriate given the complexity of combining the tasks
@bergice bergice assigned bergice and unassigned bergice Mar 13, 2019
@chillu chillu added this to the Recipe 4.4.0 milestone Apr 3, 2019
chillu added a commit to open-sausages/silverstripe-framework that referenced this issue Apr 15, 2019
chillu added a commit to open-sausages/silverstripe-framework that referenced this issue Apr 15, 2019
chillu added a commit to open-sausages/silverstripe-framework that referenced this issue Apr 16, 2019
@chillu chillu assigned chillu and unassigned chillu Apr 17, 2019
@chillu
Copy link
Member

chillu commented Apr 18, 2019

chillu added a commit to open-sausages/silverstripe-framework that referenced this issue Apr 30, 2019
maxime-rainville pushed a commit to silverstripe/silverstripe-framework that referenced this issue May 1, 2019
* NEW Legacy thumbnail migration task

See silverstripe/silverstripe-assets#235
Makes a start at silverstripe/silverstripe-assets#219 as well

* API Removed migrate_legacy_file support

For the vast majority of sites, you really don't want to run your file migration as part of dev build.
The step is involved enough to warrant it's own task.
I don't think this is an API change, since the setting won't have affect
for anyone who has already enabled it - they would've already done the one-off migration.

See silverstripeltd/open-sourcerers#91
and silverstripe/silverstripe-assets#235
@chillu chillu self-assigned this May 2, 2019
@chillu
Copy link
Member

chillu commented May 2, 2019

Has been done by implementing the referenced storycards in here.

Normalise DB File entries
Move files to the appropriate location

Those two aren't split out into individual tasks, but that's fine - they should always be run together

Find unknown files and adds matching DB entries

We haven't completed that card, but it's not blocking closing this card here.

@chillu chillu closed this as completed May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants