SilverStripe 3.x to 4.5.x migration toolkit for at least medium sized projects #397
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SilverStripe 3.x to 4.5.x migration toolkit for at least medium sized projects
Disclaimer
This pull request serves as a preview for features which can be imported into this module. Feature code is included as is from the bespoke project (it's serving as reference only). It's already well organised for module import as it contains no bespoke code dependencies unless stated in the documentation.
The goal here is to review each feature and determine if effort is worth putting into moving this feature to the module. Features identified as "worth the effort" will be separated into their own pull request which follows standard review flow.
Please
DO NOT
code review this PR. The code is not meant to be merged, only reviewed on do we want this feature in the module or not basis.Summary
Migrating assets from
3.x
to4.5.x
can be challenging if the project size is significant enough. This toolkit provides solutions for migration of such projects without changing any exisiting migration functionality. Instead, the approach here is to:Dependencies
Test setup
16 000
pages (of which7 000
published pages)28 000
assets (of which2 000
folders)50
GB asset size on discowns
and viafile tracking
)10
jobs at the same time (depends on type of job)28
hoursList of features / fixes included in this bundle
This is the full list of features / fixes with details explaining why this feature is needed or what problem is it trying to solve. Features will be numbered for quick reference but the list is in arbitrary order.
Feature 1 - Queued jobs wrapper for migration dev tasks
Problem
Solution
Part 1 MigrateFileTask / move-files
would take32
hours, but parallel run via queued jobs takes only11
hoursMajor win of this approach allows the developer to create a lot of migration work in matter of seconds which will keep the queue busy for dozens of hours. For example, on this test project the developer can run three migration related dev tasks one after another which will keep the queue processing for 20 hours and during this time no monitoring is required as everything is run through jobs. Job progression is much easier to track as the number of completed jobs is a very good indication of progress.
This solution is applied to all parts of the migration.
Part 1: MigrateFileTask / move-files
App\FileMigration\FileBinary
Part 2: MigrateFileTask / migrate-folders
4.5.2
by the product teamApp\BatchPublish\Folder
Part 3: MigrateFileTask / move-thumbnails
App\FileMigration\LegacyThumbnail
Part 4: MigrateFileTask / generate-cms-thumbnails
App\FileMigration\ImageThumbnail
Part 5: MigrateFileTask / fix-folder-permissions
App\FileMigration\FixFolderPermission
Part 6: MigrateFileTask / fix-secureassets
App\FileMigration\SecureAssets
Part 7: TagsToShortcodeTask
App\FileMigration\TagsToShortCode
ResizedImage480285-GeogL191014.png
qualifications-and-standards/qualifications/ncea/NCEA-cartoon-screen1.gif
vsQualifications-and-standards/Qualifications/NCEA/NCEA-cartoon-screen1.gif
Feature 2 - Failed migration for assets report
Problem
Solution
CMS viewable report of all assets which failed to migrate. This is a standard CMS report with no UI customisation.
Code reference
App\Report\CorruptedAssetsReport
Feature 3 - Failed migration for asset HTML references report
Problem
Solution
CMS viewable report of all asset HTML references which failed to migrate. This is a standard CMS report with no UI customisation.
Code reference
App\Report\LegacyAssetsReport
Feature 4 - Batch page publish
Problem
Solution
Code reference
App\BatchPublish\Page
Feature 5 - Batch asset publish
Problem
Solution
Code reference
App\BatchPublish\Asset
Feature 6 - Publish recursive setup
Problem
Solution
owns
,owned_by
4.x
and need to be added as a part of the upgradeFeature 7 - Recursive operations setup
Problem
Solution
cascade_duplicates
,cascade_deletes
4.x
and need to be added as a part of the upgrade