Uploaded image for project: 'Migration Platform'
  1. Migration Platform
  2. MIG-79

Check users with invalid emails only for the selected Spaces to migrate in the Confluence Cloud Migration Assistant

    XMLWordPrintable

Details

    • 16
    • Severity 3 - Minor

    Description

      Problem Definition

      When creating a plan to migrate data from Confluence Server to Cloud through the Confluence Cloud Migration Assistant app, when selecting to not migrate users, the app checks and show all users that have invalid email suggesting to fix them, even though the app won't migrate all of them.

      The users that have content associated with the Spaces that were selected to migrate will then be migrated, and some of these users might have an invalid email address that will eventually cause the Space migration to fail with the error message in the UI with

      Transaction rolled back because it has been marked as rollback-only
      

      Suggested Solution

      When selecting to not migrate users, the app should check for invalid emails only for the users that have content associated with the Spaces that were selected to the migrated.
      This way we will know which users have to be fixed so that we can migrate those Spaces without having to fix all users with invalid emails which for instances with a large number of users might not be a feasible alternative.

      Logs

      com.atlassian.confluence.importexport.ImportExportException: com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: Failed to call to IDP to invite user
      com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:407)
      com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEverything(BackupImporter.java:359)
      com.atlassian.confluence.importexport.xmlimport.FileBackupImporter.importEverything(FileBackupImporter.java:165)
      com.atlassian.confluence.importexport.xmlimport.BackupImporter.doImportInternal(BackupImporter.java:218)
      com.atlassian.confluence.importexport.Importer.doImport(Importer.java:68)
      com.atlassian.confluence.importexport.DefaultImportExportManager.performImportInternal(DefaultImportExportManager.java:219)
      com.atlassian.confluence.importexport.DefaultImportExportManager.lambda$getImportTxCallback$0(DefaultImportExportManager.java:149)
      com.atlassian.confluence.importexport.xmlimport.RestorePluginStateStoreTransactionCallbackDecorator.doInTransaction(RestorePluginStateStoreTransactionCallbackDecorator.java:46)
      com.atlassian.confluence.importexport.xmlimport.RestorePluginStateStoreTransactionCallbackDecorator.doInTransaction(RestorePluginStateStoreTransactionCallbackDecorator.java:30)
      com.atlassian.confluence.importexport.xmlimport.RestoreBandanaValuesTransactionCallbackDecorator.doInTransaction
      ......
      
      Caused by: com.atlassian.confluence.importexport.ImportExportException: Unable to complete import: Error while importing backup: Failed to call to IDP to invite user
      com.atlassian.confluence.importexport.xmlimport.DefaultXmlImporter.doImport(DefaultXmlImporter.java:101)
      com.atlassian.confluence.importexport.xmlimport.BackupImporter.importEntities(BackupImporter.java:390)
      
      Caused by: com.atlassian.idp.client.exceptions.BadRequestException: {"errorType":"InvalidSchema","message":"Invalid email address"}
      com.atlassian.idp.client.IdentityPlatformClientImpl.mapStatusCodeException(IdentityPlatformClientImpl.java:706)
      com.atlassian.idp.client.IdentityPlatformClientImpl.mapInputStream(IdentityPlatformClientImpl.java:621
      com.atlassian.idp.client.IdentityPlatformClientImpl.makeRequestWithJsonEntityBody(IdentityPlatformClientImpl.java:606)
      com.atlassian.idp.client.IdentityPlatformClientImpl.inviteUser(IdentityPlatformClientImpl.java:418)
      com.atlassian.confluence.internal.idp.InviteUserIdentityPlatformCommand.run(InviteUserIdentityPlatformCommand.java:32)
      com.atlassian.confluence.internal.idp.InviteUserIdentityPlatformCommand.run(InviteUserIdentityPlatformCommand.java:17)
      com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:302)
      com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:298)
      rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:46)
      

      Workaround

      Extract the file entities.xml from the space export and run this command to identify the blank emails and the users.

      xmlstarlet sel --template --match "/hibernate-generic/object[@class='ConfluenceUserImpl'][@package='com.atlassian.confluence.user']" --sort A:T:U "property[@name='email']" --value-of "id[@name='key']" --output "," --value-of "property[@name='lowerName']" --output "," --value-of "property[@name='email']" -nl entities.xml
      

      Note: It only works in Confluence 6.15.X as the email doesn't get exported in lower versions of Confluence server.

      Attachments

        Issue Links

          Activity

            People

              jrichards@atlassian.com James Richards
              foselame Francisco Oselame (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: