U4-7286 - Upgrade script to normalize all GUIDs for content types + update Courier to support it

Created by Shannon Deminick 22 Oct 2015, 08:48:15 Updated by Claus Jensen 18 Nov 2015, 12:42:42

We need to transfer content types using GUIDs in Courier, not aliases. In order to do this we need an upgrade script to normalize all GUIDs for content types so they are consistent between environments (i.e. based on alias + object type)

Comments

Claus Jensen 10 Nov 2015, 13:03:10

Migration for normalizing the GUIDs of content types, in core. Core PR: https://github.com/umbraco/Umbraco-CMS/pull/890

Support for handling GUID based .courier files if Umbraco 7.4 where types have GUIDs. Courier PR: https://github.com/umbraco/UmbracoDeploy/pull/3


Shannon Deminick 13 Nov 2015, 10:20:16

I've pushed changes to the Core PR, found in rev: bf40fc25e6947447f6c11b27d3903b79a9a2f4ac

The Changes for Courier don't include the same functionality for Media types or Member types. This needs to work for all content types.

Moving back to re-opened.


Claus Jensen 16 Nov 2015, 13:09:20

@Shandem I've updated the PR to handle media types and member types. Also realigned the way things are handled in the 3 helpers/persisters so they are more similar (since they are pretty much doing the same anyways) - makes it easier for us to debug and apply fixes in all places.

Please note I've rebased on dev-v7 and forced pushed so you should clear your local branch.. there was a bunch of merge conflicts in the PR it seems.

I've tested that I could create new media types and member types and they were persisted with guid as filename - and could restore on the destination from the guid based file.


Shannon Deminick 17 Nov 2015, 14:55:28

Some notes:

  • PR code looks good
  • Tested on 7.3.1 - normal courier: ** saving a doc type /w an old courier file using Alias as Id = remains the same = ok ** saving a media type /w an old courier file using Alias as Id = remains the same = ok ** saving a member type /w an old courier file using Alias as Id = remains the same = ok ** adding properties to media type, deploying to dest = ok ** adding properties to member type, cannot deploy ... the UI does not support this = ok ** adding properties to doc type, deploying to dest = ok ** updating new properties on content item with updated doc type, deploying to dest = ok ** updating new properties on media item with updated media type, deploying to dest = ok ** creating a doc type /w template, groups, props, deploying to deest = ok ** creating a media type /w template, groups, props, deploying to deest = ok
  • Tested on 7.3.1 - uaas courier: ** updating new properties on content item with updated doc type, deploying to dest = FAILED ** updating new properties on media item with updated media type, deploying to dest = FAILED

The UaaS tests failed because when it was hashing the content types for comparison, the hashes never match because it was trying to use the UniqueId as the hash

  • Tested on 7.4 (from upgrade) - normal courier: ** Saved an existing media type, it deleted the old courier file and created the new one with the GUID id = ok ** Saved an existing doc type, it deleted the old courier file and created the new one with the GUID id = ok ** Saved an existing member type, it deleted the old courier file and created the new one with the GUID id = ok
  • Tested on 7.4 (from upgrade) - uaas courier: ** Validated that content will not be sent if the GUIDs are different in the db = ok ** Forced upgrade to run to sync the GUIDs, then tried again = FAILED (but the GUIDs were in sync)

I tried to delete all content/media types, then use Courier to send them and that was fine, but when i tried to send all of the media it failed saying that the hashes were incorrect. It turns out that we are including properties that just have whitespace in the hash, so I've now fixed that too. Now transferring works.

@Claus.Jensen I've updated the PR with these changes, i'll need you to review


Shannon Deminick 17 Nov 2015, 14:55:58

If you are happy with my changes, please pull in the PR and close - you might want to test the things that failed for me to verify.


Claus Jensen 18 Nov 2015, 12:42:42

Merged in PR and creating new task for remaining testing in 7.4.


Priority: Task - Pri 1

Type: Task

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 7.4.0

Sprint: Sprint 3

Story Points:

Cycle: