All Products
Search
Document Center

Realtime Compute for Apache Flink:Manage deployment versions

Last Updated:Aug 31, 2023

After you edit the deployment code and click Deploy on the SQL Editor page in the console of fully managed Flink to deploy a draft, fully managed Flink automatically generates a new version for the deployment of the draft. When you edit a deployment, you can compare the current version with an earlier version. After you compare the versions, you can determine whether to roll back the current deployment information to the earlier version.

Background information

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

Compare deployment versions

Only SQL code and deployment 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 SQL Editor.

  4. Double-click the name of the desired deployment.

  5. On the right side of the SQL Editor page, click the Versions tab.

  6. In the Draft Versions panel, 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 version that you are editing.

    image.png

Roll back a deployment version

You can roll back the deployment information of the version that is generated after the deployment is published to the deployment version that you are editing.

  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 SQL Editor.

  4. Double-click the name of the desired deployment.

  5. On the right side of the SQL Editor page, click the Versions tab.

  6. In the Draft Versions panel of the SQL Editor page, find the version to which you want to roll back the current deployment information and choose More > Rollback in the Actions column.

  7. In the Draft Version dialog box, click Rollback.

    image.png

Lock a deployment version

The system supports a maximum of 50 deployment versions. If the number of deployment 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 SQL Editor.

  4. Double-click the name of the desired deployment.

  5. On the right side of the SQL Editor page, click the Versions tab.

  6. In the Draft Versions panel of the SQL 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 锁 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 deployment version

You can delete the deployment 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 SQL Editor.

  4. Double-click the name of the desired deployment.

  5. On the right side of the SQL Editor page, click the Versions tab.

  6. In the Draft Versions panel of the SQL 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.