-
Notifications
You must be signed in to change notification settings - Fork 821
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
NEW Legacy thumbnail migration task #8924
NEW Legacy thumbnail migration task #8924
Conversation
a55d0e6
to
a0c0e23
Compare
See silverstripe/silverstripe-assets#235 Makes a start at silverstripe/silverstripe-assets#219 as well
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 https://github.com/silverstripeltd/open-sourcerers/issues/91 and silverstripe/silverstripe-assets#235
188f432
to
39e72d0
Compare
Technically an API breakage, but I don't see migration helpers as part of our API surface. They're one off utilitie
39e72d0
to
bb75995
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While the new logger approach is a step in the right direction, it also makes the output a lot less pleasant to look at on the web and CLI. Any chance we could sneak in some minor formatting tweaks?
I tested that each sub tasks gets call correctly. I didn't test that each task actually works together. If you feel that this is important to test before the RC release, I can have a go at it.
Also, sub-sites extends the FileMigrationTask, which I haven't tested yet. Let me know if this needs to be done before the RC release.
If additional security or visibility rules should be applied to File dataobjects, then | ||
make sure to correctly extend `canView` via extensions. | ||
|
||
## Automatic migration | ||
Imports all files referenced by File dataobjects into the new Asset Persistence Layer introduced in 4.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The style of this paragraph doesn't seem to match the one use by the two previous ones and seem to partially repeat some of the points.
Maybe reformat the entire thing in the form of:
This task will:
* Import all files referenced by File dataobjects into the new Asset Persistence Layer introduced in 4.0.
* Migrate existing File objects to file versioning.
* Moves existing thumbnails, and generates new thumbnail sizes for the CMS UI.
Any pre-existing File objects will be automatically published to the live stage, to ensure
that previously visible assets remain visible to the public site.
If the task fails or times out, run it again and it will start where it left off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I've rearranged that a bit
src/Dev/Tasks/MigrateFileTask.php
Outdated
@@ -22,36 +23,127 @@ class MigrateFileTask extends BuildTask | |||
|
|||
protected $title = 'Migrate File dataobjects from 3.x'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's no longer SS3 specific
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
According to Max's feedback
Max pointed out that it's only shown on the website, so would need HTML for the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review @maxime-rainville !
If additional security or visibility rules should be applied to File dataobjects, then | ||
make sure to correctly extend `canView` via extensions. | ||
|
||
## Automatic migration | ||
Imports all files referenced by File dataobjects into the new Asset Persistence Layer introduced in 4.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I've rearranged that a bit
src/Dev/Tasks/MigrateFileTask.php
Outdated
@@ -22,36 +23,127 @@ class MigrateFileTask extends BuildTask | |||
|
|||
protected $title = 'Migrate File dataobjects from 3.x'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Merge after #8910Merge before silverstripe/silverstripe-assets#242
See silverstripe/silverstripe-assets#235 Makes a
start at silverstripe/silverstripe-assets#219 as well