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

NEW Legacy thumbnail migration task #8924

Merged

Conversation

chillu
Copy link
Member

@chillu chillu commented Apr 15, 2019

src/Logging/PreformattedEchoHandler.php Outdated Show resolved Hide resolved
@unclecheese unclecheese changed the base branch from 4 to 4.4 April 24, 2019 02:45
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
Technically an API breakage, but I don't see migration helpers as part of our API surface.
They're one off utilitie
Copy link
Contributor

@maxime-rainville maxime-rainville left a 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.
Copy link
Contributor

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.

Copy link
Member Author

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

docs/en/04_Changelogs/4.4.0.md Show resolved Hide resolved
@@ -22,36 +23,127 @@ class MigrateFileTask extends BuildTask

protected $title = 'Migrate File dataobjects from 3.x';
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

src/Dev/Tasks/MigrateFileTask.php Show resolved Hide resolved
chillu added 3 commits May 1, 2019 11:08
According to Max's feedback
Max pointed out that it's only shown on the website,
so would need HTML for the list.
Copy link
Member Author

@chillu chillu left a 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.
Copy link
Member Author

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

docs/en/04_Changelogs/4.4.0.md Show resolved Hide resolved
@@ -22,36 +23,127 @@ class MigrateFileTask extends BuildTask

protected $title = 'Migrate File dataobjects from 3.x';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

src/Dev/Tasks/MigrateFileTask.php Show resolved Hide resolved
@maxime-rainville maxime-rainville merged commit 0696045 into silverstripe:4.4 May 1, 2019
@maxime-rainville maxime-rainville deleted the pulls/4/thumbnail-helper branch May 1, 2019 21:33
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.

3 participants