After you click Publish on the Draft Editor page in the console of fully managed Flink to publish a job, the system automatically generates a new version for the job. When you edit a job, you can compare the current editing version with an earlier version. After you compare the versions, you can determine whether to roll back the current job information to the earlier version.

Background information

This topic describes how to manage job versions from the following aspects:

Compare job versions

Only SQL code and job configurations can be compared. The differences are highlighted based on the comparison results.

  1. Log on to the Realtime Compute for Apache Flink console.
  2. On the Fully Managed Flink tab, find the workspace that you want to manage, and click Console in the Actions column.
  3. In the left-side navigation pane, click Draft Editor.
  4. Double-click the name of the job whose versions you want to compare.
  5. On the right side of the Draft Editor page, click the Versions tab.
    Versions
  6. Find the version that you want to edit and click Diff in the Actions column.
  7. In the Select Editing Version pane on the left side of the Draft Version dialog box, select the version that you want to compare with the current editing version.
    Version comparison

Roll back a job version

You can roll back the job information of the version that is generated after the job is published to the current editing version.

  1. Log on to the Realtime Compute for Apache Flink console.
  2. On the Fully Managed Flink tab, find the workspace that you want to manage, and click Console in the Actions column.
  3. In the left-side navigation pane, click Draft Editor.
  4. Double-click the name of the job whose versions you want to compare.
  5. On the right side of the Draft Editor page, click the Versions tab.
    Versions
  6. In the Draft Versions pane of the Draft Editor page, find the version to which you want to roll back the current job information and choose More > Rollback in the Actions column.
  7. In the Draft Version dialog box, click Rollback.
    Rollback

Lock a job version

The system supports a maximum of 50 job versions. If the number of job versions exceeds 50, the system automatically deletes the earliest version. You can lock a specific version to ensure that the version is not automatically deleted.

  1. Log on to the Realtime Compute for Apache Flink console.
  2. On the Fully Managed Flink tab, find the workspace that you want to manage, and click Console in the Actions column.
  3. In the left-side navigation pane, click Draft Editor.
  4. Double-click the name of the job whose versions you want to compare.
  5. On the right side of the Draft Editor page, click the Versions tab.
    Versions
  6. In the Draft Versions pane of the Draft Editor page, find the version that you want to lock and choose More > Lock in the Actions column.
    After the version is locked, a message that indicates the version is locked appears in the upper part of the page, and the Lock icon is displayed next to the version.
    Note If you want to delete a locked version, you must first unlock the version. To unlock the version, choose More > Unlock in the Actions column.

Delete a job version

You can delete the job versions that you no longer use.

  1. Log on to the Realtime Compute for Apache Flink console.
  2. On the Fully Managed Flink tab, find the workspace that you want to manage, and click Console in the Actions column.
  3. In the left-side navigation pane, click Draft Editor.
  4. Double-click the name of the job whose versions you want to compare.
  5. On the right side of the Draft Editor page, click the Versions tab.
    Versions
  6. In the Draft Versions pane of the Draft Editor page, find the version that you want to delete and choose More > Delete in the Actions column.
  7. In the Draft Version dialog box, click Delete.