Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Since each client can encounter one of these old objects at any time, client developers have be been forced to support both the 'old' way and the 'new' way of working with entities for years now.  This adds complexity and increases the support cost for each client.  This document outlines a plan for migrating all old types into the types we currently support in Synapse.

...

Return codeNameCondition
201CreatedThe entity type convertion was successful
412Precondition FailedReturned if the passed entity.etag does not match the etag of the entity (ConflictingUpdateException)
400Bad RequestThe entity cannot be converted for any reason.  The message should explain why the type change failed.

Table 2.

The following table lists how each old type will be converted into a new type. 

...

Original EntityConverted ToDetails
Non-container Locationable with a single LocationData of type awss3FileEntityAn S3FileHandle will be created for the location.  The type will be changed to a FileEntity pointing to the new FileHandle
Non-container Locationable with a single LocationData of type externalFileEntityAn ExternalFileHandle will be created for the location.  The type will be change to a FileEntity pointing to the new FilewHandle.
Non-container Locationable with a single LocationData of type awsebs, sage, githubUnsupported (400)There is no way to represent these types with  FileHandles.  The caller will need to convert the type to either awss3 or external and then try again.
Non-container Locationable with more than one LocationData of any typeUnsupported (400)There is now way to represent multiple location with a single file.  the caller will need to pick a single location to keep and remove the rest and then try again.
Non-container Locationable that has one or more Link childrenUnsupported (400)File cannot have children.  The caller must move or delete the Links and try again.
Container non-locationableFolderThe container will simply be converted to folder.
Container locationable with n number of LocationData of type awss3 or externalFolder + n child FileEntityThe original entity will be converted to a folder, and a child FileEntity will be added for each valid LocationData.
Container locationable with n number of LocationData of type awsebs, sage, githubUnsupported (400)There is no way to represent these types with  FileHandles.  The caller will need to convert the type to either awss3 or external and then try again.

Table 3

Migration plan

  1. Once the new entity conversion service is in place, we will setup a script to to call it for every old entity on staging.  The script will record all entities that file to convert for any reason.  The normal migration process will "undo" all type changes on staging.
  2. We will need to work with the original entity owners to find fixes for all entities that cannot be changed.  We will also need the original owners to review the type changes on staging and confirm the migration went as expected.
  3. For all successful type conversions on staging we can repeat the conversion on production (making the type change permanent).
  4. Repeat steps 1-3 until all old types are converted.