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

Creating a CCMA migration plan through the REST API can cause the SpaceKeysConflict pre-flight check to PASS when it should FAIL.

    XMLWordPrintable

Details

    • 2
    • Minor
    • 6

    Description

      Creating a CCMA migration plan through the REST API can cause the SpaceKeysConflict pre-flight check to not work properly.

      Issue Summary

      This is reproducible on Data Center: yes

      When creating a CCMA plan through the REST API, if you include a space key from the on-prem site to the REST API payload where the casing may be different on the cloud, it will cause the SpaceKeysConflict pre-flight check to give a false positive, resulting in a SKIPPED status for some spaces.

      Steps to Reproduce

      1. Create a space with the Test space key on the server
      2. Create a space with the test space key on the cloud
      3. Create a CCMA migration plan following the instructions on Migrate Jira or Confluence to cloud using public APIs including the Test space. For example:
        curl --request POST \
          --url 'https://api.atlassian.com/migrations/public/v1/jobs' \
          --user '<USER>:<PASS>' \
          --header 'Accept: application/json' \
          --header 'Content-Type: application/json' \
          --data '{
            "flow": "confluence-server-to-cloud",
            "source": {
                "serverId": "<SERVER_ID>"
            },
            "destination": {
                "url": "https://<SITE>.atlassian.net"
            },
            "scope": {
                "spaces": {
                    "includedKeys": [
                        "Test"
                    ]
                }
            }
        }'
      4. Execute the pre-flight checks
      5. Run the migration

      Expected Results

      The CCMA pre-flight check for the SpaceKeysConflict will identify the space key conflict based on the lowerspacekey value (stored on the spaces database table). In the example above, we should see a conflict since the lowerspacekey values is the same for both spaces with space key Test and test.

      Actual Results

      The CCMA pre-flight check for the SpaceKeysConflict will not report a conflict between the two spaces. This will fail a space batch on the cloud, flagging the spaces as SKIPPED.

      atlassian-confluence log signature

      Pre-flight check

      <DATE> INFO [<THREAD_NAME>] [agent.service.confluence.ConfluenceCloudService] getConflictingSpacesInCloud SpaceConflictCheck: Found [0] conflicts from [1] spacesToMigrate

      Space import

      <DATE> INFO [<THREAD_NAME>] [agent.service.execution.PlanExecutionService] info Step <STEP_ID> completed execution <TASK_ID> with result=StepResult(isSuccess=true, isStopped=false, message=We can't migrate the space <SPACE_KEY> as it has already been imported by another ongoing or completed migration., result=SKIPPED, e=null)
       -- url: /confluence/rest/plugins/1.0/ | traceId: b0cd20f28666e9b9 | userName: admin | referer: <BASE_URL>/plugins/servlet/upm

      CCMA plan screenshots

      Pre-flight checks result.
      CCMA plan result.

      Workaround

      When using the REST API instead of the CCMA GUI to create migration plans, Confluence admins should manually check source DC and destination Cloud instances for space key conflicts to avoid conflicts during space migration that result in skipped spaces. This pre-migration step should be added to any Runbooks (during the Test or Prod Migration phase) before using the REST API to create migration plans in CCMA.

      Attachments

        Issue Links

          Activity

            People

              e16baff27877 Nayan Seth
              fbeck Fábio W. [Atlassian]
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: