Approving code changes in plan executions

Review the code that Code Migrator refactored for an Airflow or Spark plan execution, and mark the Review code changes step as completed, so that Cloudera Migration Assistant merges the changes and continues.

An Airflow or Spark plan execution processes the refactored code as follows:

  1. It copies the source code and resources to an intermediate Git repository, on a plan branch.
  2. It starts Code Migrator jobs that refactor the code for the target version. Each job writes its changes to its own branch, named code-agent-branch-[***JOB-ID***], which starts from the plan branch.
  3. It stops at the Review code changes step, which is a manual step.
  4. After you mark that step as completed, the Finalize changes step merges the branches of the jobs into the plan branch.
  5. The remaining steps move the merged code to the target.
  6. The last step, Clean up temporary files, merges the plan branch into the base branch of the intermediate repository.
  • The execution has reached the Review code changes step.
  • You have the cma-migrator or cma-admin role.
  1. On the Plans page, open the plan.
  2. Click the Execution tab, and then click the execution.
  3. Click the Execution Steps tab.
  4. Open the branches of the Code Migrator jobs in the intermediate Git repository, and review the changes.
    To see the plan, the changes, and the agent activity of a job, open the job on the Refactor page. See Reviewing output on Git branches.
  5. Optional: If a change needs a correction, push the correction to the branch of that job.
  6. On the Review code changes step, click Mark As Completed.
    The Complete 'Review code changes' step dialog opens.
  7. Click OK.
    You cannot undo this action.

The Finalize changes step merges the branches, as they are when it runs, into the plan branch. To continue, run the remaining steps. See Running plan executions.

If you do not want to use the refactored code, do not mark the step as completed. The execution waits at the Review code changes step, and nothing is merged.

Each Code Migrator job writes to its own branch, so the result of each job stays separate until the merge step. When you import collections into a plan, the plan keeps a snapshot of them. Later changes to the collections do not change the plan.