You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/10/27 09:31:56 UTC

[GitHub] [flink] zentol opened a new pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

zentol opened a new pull request #17578:
URL: https://github.com/apache/flink/pull/17578


   With this PR users can provide the triggerId when triggering a (stop-with-)savepoint. This effectively allows users to safely retry a savepoint operation within the caching interval.
   The runtime already handles this appropriately.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol commented on a change in pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #17578:
URL: https://github.com/apache/flink/pull/17578#discussion_r742626076



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/savepoints/SavepointTriggerRequestBody.java
##########
@@ -19,39 +19,56 @@
 package org.apache.flink.runtime.rest.messages.job.savepoints;
 
 import org.apache.flink.runtime.rest.messages.RequestBody;
+import org.apache.flink.runtime.rest.messages.TriggerId;
 
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
 import javax.annotation.Nullable;
 
+import java.util.Optional;
+
 /** {@link RequestBody} to trigger savepoints. */
 public class SavepointTriggerRequestBody implements RequestBody {
 
     public static final String FIELD_NAME_TARGET_DIRECTORY = "target-directory";
 
     private static final String FIELD_NAME_CANCEL_JOB = "cancel-job";
 
+    private static final String FIELD_NAME_TRIGGER_ID = "triggerId";
+
     @JsonProperty(FIELD_NAME_TARGET_DIRECTORY)
     @Nullable
     private final String targetDirectory;
 
     @JsonProperty(FIELD_NAME_CANCEL_JOB)
     private final boolean cancelJob;
 
+    @JsonProperty(FIELD_NAME_TRIGGER_ID)
+    @Nullable
+    private final TriggerId triggerId;
+
     @JsonCreator
     public SavepointTriggerRequestBody(
             @Nullable @JsonProperty(FIELD_NAME_TARGET_DIRECTORY) final String targetDirectory,
-            @Nullable @JsonProperty(FIELD_NAME_CANCEL_JOB) final Boolean cancelJob) {
+            @Nullable @JsonProperty(FIELD_NAME_CANCEL_JOB) final Boolean cancelJob,
+            @Nullable @JsonProperty(FIELD_NAME_TRIGGER_ID) TriggerId triggerId) {
         this.targetDirectory = targetDirectory;
         this.cancelJob = cancelJob != null ? cancelJob : false;
+        this.triggerId = triggerId;
     }
 
     @Nullable
     public String getTargetDirectory() {
         return targetDirectory;
     }
 
+    @JsonIgnore
+    public Optional<TriggerId> getTriggerId() {
+        return Optional.ofNullable(triggerId);
+    }

Review comment:
       I can add a commit to make this consistent.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   * 47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268ecc036767d9ad8008ce4c22d1af7292824331 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508) 
   * 639b420be63844073345b89063cba258cc652f23 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268ecc036767d9ad8008ce4c22d1af7292824331 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508) 
   * 639b420be63844073345b89063cba258cc652f23 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   * 47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   * 47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268ecc036767d9ad8008ce4c22d1af7292824331 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268ecc036767d9ad8008ce4c22d1af7292824331 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952730101


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 268ecc036767d9ad8008ce4c22d1af7292824331 (Wed Oct 27 09:36:24 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   * 47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930) 
   * 76bbcdb19cc62e0794d2f566e3553dfa0426d8a6 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol commented on a change in pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #17578:
URL: https://github.com/apache/flink/pull/17578#discussion_r742625220



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/savepoints/SavepointTriggerRequestBody.java
##########
@@ -19,39 +19,56 @@
 package org.apache.flink.runtime.rest.messages.job.savepoints;
 
 import org.apache.flink.runtime.rest.messages.RequestBody;
+import org.apache.flink.runtime.rest.messages.TriggerId;
 
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
 import javax.annotation.Nullable;
 
+import java.util.Optional;
+
 /** {@link RequestBody} to trigger savepoints. */
 public class SavepointTriggerRequestBody implements RequestBody {
 
     public static final String FIELD_NAME_TARGET_DIRECTORY = "target-directory";
 
     private static final String FIELD_NAME_CANCEL_JOB = "cancel-job";
 
+    private static final String FIELD_NAME_TRIGGER_ID = "triggerId";

Review comment:
       camelCase for all new fields. dashes are deprecated and will be removed at some point.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   * 47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930) 
   * 76bbcdb19cc62e0794d2f566e3553dfa0426d8a6 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   * 47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   * 47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol commented on a change in pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #17578:
URL: https://github.com/apache/flink/pull/17578#discussion_r742634265



##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/job/savepoints/SavepointTriggerRequestBodyTest.java
##########
@@ -44,8 +45,10 @@ public SavepointTriggerRequestBodyTest(
     public static Collection<Object[]> data() {
         return Arrays.asList(
                 new Object[][] {
-                    {new SavepointTriggerRequestBody("/tmp", true)},
-                    {new SavepointTriggerRequestBody("/tmp", false)}
+                    {new SavepointTriggerRequestBody("/tmp", true, null)},
+                    {new SavepointTriggerRequestBody("/tmp", false, null)},
+                    {new SavepointTriggerRequestBody("/tmp", true, new TriggerId())},
+                    {new SavepointTriggerRequestBody("/tmp", false, new TriggerId())},

Review comment:
       No, it was probably just missed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268ecc036767d9ad8008ce4c22d1af7292824331 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268ecc036767d9ad8008ce4c22d1af7292824331 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508) 
   * 639b420be63844073345b89063cba258cc652f23 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268ecc036767d9ad8008ce4c22d1af7292824331 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508) 
   * 639b420be63844073345b89063cba258cc652f23 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol commented on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
zentol commented on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-960574597


   I've added a few notes to the docs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] nicoweidner commented on a change in pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
nicoweidner commented on a change in pull request #17578:
URL: https://github.com/apache/flink/pull/17578#discussion_r741924689



##########
File path: docs/layouts/shortcodes/generated/rest_v1_dispatcher.html
##########
@@ -3260,6 +3260,9 @@
     },
     "target-directory" : {
       "type" : "string"
+    },
+    "triggerId" : {
+      "type" : "any"

Review comment:
       Why is this generated as `any` instead of `string`?

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/savepoints/stop/StopWithSavepointRequestBody.java
##########
@@ -19,32 +19,44 @@
 package org.apache.flink.runtime.rest.messages.job.savepoints.stop;
 
 import org.apache.flink.runtime.rest.messages.RequestBody;
+import org.apache.flink.runtime.rest.messages.TriggerId;
 
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
 import javax.annotation.Nullable;
 
+import java.util.Optional;
+
 /** {@link RequestBody} for stopping a job with a savepoint. */
 public class StopWithSavepointRequestBody implements RequestBody {
 
     public static final String FIELD_NAME_TARGET_DIRECTORY = "targetDirectory";

Review comment:
       Here, camel case is used for everything. So maybe that should be the standard :D

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/job/savepoints/SavepointTriggerRequestBodyTest.java
##########
@@ -44,8 +45,10 @@ public SavepointTriggerRequestBodyTest(
     public static Collection<Object[]> data() {
         return Arrays.asList(
                 new Object[][] {
-                    {new SavepointTriggerRequestBody("/tmp", true)},
-                    {new SavepointTriggerRequestBody("/tmp", false)}
+                    {new SavepointTriggerRequestBody("/tmp", true, null)},
+                    {new SavepointTriggerRequestBody("/tmp", false, null)},
+                    {new SavepointTriggerRequestBody("/tmp", true, new TriggerId())},
+                    {new SavepointTriggerRequestBody("/tmp", false, new TriggerId())},

Review comment:
       Is there a reason we have these tests for triggerSavepoint, but not stopWithSavepoint?

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/savepoints/StopWithSavepointHandlersTest.java
##########
@@ -213,20 +216,61 @@ public void testSavepointCompletedWithException() throws Exception {
         assertThat(savepointError, instanceOf(RuntimeException.class));
     }
 
+    @Test
+    public void testProvidedTriggerId() throws Exception {
+        final OperationResult<String> successfulResult =
+                OperationResult.success(COMPLETED_SAVEPOINT_EXTERNAL_POINTER);
+        AtomicReference<AsynchronousJobOperationKey> keyReference = new AtomicReference<>();
+        final TestingRestfulGateway testingRestfulGateway =
+                new TestingRestfulGateway.Builder()
+                        .setStopWithSavepointFunction(setReferenceToOperationKey(keyReference))
+                        .setGetSavepointStatusFunction(
+                                getResultIfKeyMatches(successfulResult, keyReference))
+                        .build();
+
+        final TriggerId providedTriggerId = new TriggerId();
+
+        final TriggerId returnedTriggerId =
+                savepointTriggerHandler
+                        .handleRequest(
+                                triggerSavepointRequest(
+                                        DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY,
+                                        providedTriggerId),
+                                testingRestfulGateway)
+                        .get()
+                        .getTriggerId();
+
+        assertEquals(providedTriggerId, returnedTriggerId);
+
+        AsynchronousOperationResult<SavepointInfo> savepointResponseBody;
+        savepointResponseBody =
+                savepointStatusHandler
+                        .handleRequest(
+                                savepointStatusRequest(providedTriggerId), testingRestfulGateway)
+                        .get();
+
+        assertThat(savepointResponseBody.queueStatus().getId(), equalTo(QueueStatus.Id.COMPLETED));
+        assertThat(savepointResponseBody.resource(), notNullValue());
+        assertThat(
+                savepointResponseBody.resource().getLocation(),
+                equalTo(COMPLETED_SAVEPOINT_EXTERNAL_POINTER));
+    }
+
     private static HandlerRequest<StopWithSavepointRequestBody> triggerSavepointRequest()
             throws HandlerRequestException {
-        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY);
+        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY, null);
     }
 
     private static HandlerRequest<StopWithSavepointRequestBody>
             triggerSavepointRequestWithDefaultDirectory() throws HandlerRequestException {
-        return triggerSavepointRequest(null);
+        return triggerSavepointRequest(null, null);
     }
 
     private static HandlerRequest<StopWithSavepointRequestBody> triggerSavepointRequest(
-            final String targetDirectory) throws HandlerRequestException {
+            final String targetDirectory, @Nullable TriggerId triggerId)

Review comment:
       Same comment about `@Nullable`

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/savepoints/SavepointTriggerRequestBody.java
##########
@@ -19,39 +19,56 @@
 package org.apache.flink.runtime.rest.messages.job.savepoints;
 
 import org.apache.flink.runtime.rest.messages.RequestBody;
+import org.apache.flink.runtime.rest.messages.TriggerId;
 
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
 import javax.annotation.Nullable;
 
+import java.util.Optional;
+
 /** {@link RequestBody} to trigger savepoints. */
 public class SavepointTriggerRequestBody implements RequestBody {
 
     public static final String FIELD_NAME_TARGET_DIRECTORY = "target-directory";
 
     private static final String FIELD_NAME_CANCEL_JOB = "cancel-job";
 
+    private static final String FIELD_NAME_TRIGGER_ID = "triggerId";

Review comment:
       Are we using camel case or something else, e.g. `target-directory` (kebab-case or whatever you call that)?

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/savepoints/SavepointHandlersTest.java
##########
@@ -208,20 +211,61 @@ public void testSavepointCompletedWithException() throws Exception {
         assertThat(savepointError, instanceOf(RuntimeException.class));
     }
 
+    @Test
+    public void testProvidedTriggerId() throws Exception {
+        final OperationResult<String> successfulResult =
+                OperationResult.success(COMPLETED_SAVEPOINT_EXTERNAL_POINTER);
+        AtomicReference<AsynchronousJobOperationKey> keyReference = new AtomicReference<>();
+        final TestingRestfulGateway testingRestfulGateway =
+                new TestingRestfulGateway.Builder()
+                        .setTriggerSavepointFunction(setReferenceToOperationKey(keyReference))
+                        .setGetSavepointStatusFunction(
+                                getResultIfKeyMatches(successfulResult, keyReference))
+                        .build();
+
+        final TriggerId providedTriggerId = new TriggerId();
+
+        final TriggerId returnedTriggerId =
+                savepointTriggerHandler
+                        .handleRequest(
+                                triggerSavepointRequest(
+                                        DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY,
+                                        providedTriggerId),
+                                testingRestfulGateway)
+                        .get()
+                        .getTriggerId();
+
+        assertEquals(providedTriggerId, returnedTriggerId);
+
+        AsynchronousOperationResult<SavepointInfo> savepointResponseBody;
+        savepointResponseBody =
+                savepointStatusHandler
+                        .handleRequest(
+                                savepointStatusRequest(providedTriggerId), testingRestfulGateway)
+                        .get();
+
+        assertThat(savepointResponseBody.queueStatus().getId(), equalTo(QueueStatus.Id.COMPLETED));
+        assertThat(savepointResponseBody.resource(), notNullValue());
+        assertThat(
+                savepointResponseBody.resource().getLocation(),
+                equalTo(COMPLETED_SAVEPOINT_EXTERNAL_POINTER));
+    }
+
     private static HandlerRequest<SavepointTriggerRequestBody> triggerSavepointRequest()
             throws HandlerRequestException {
-        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY);
+        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY, null);
     }
 
     private static HandlerRequest<SavepointTriggerRequestBody>
             triggerSavepointRequestWithDefaultDirectory() throws HandlerRequestException {
-        return triggerSavepointRequest(null);
+        return triggerSavepointRequest(null, null);
     }
 
     private static HandlerRequest<SavepointTriggerRequestBody> triggerSavepointRequest(
-            final String targetDirectory) throws HandlerRequestException {
+            final String targetDirectory, @Nullable TriggerId triggerId)

Review comment:
       Looking at the call just above, `targetDirectory` should probably have `@Nullable` as well

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/savepoints/SavepointTriggerRequestBody.java
##########
@@ -19,39 +19,56 @@
 package org.apache.flink.runtime.rest.messages.job.savepoints;
 
 import org.apache.flink.runtime.rest.messages.RequestBody;
+import org.apache.flink.runtime.rest.messages.TriggerId;
 
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
 import javax.annotation.Nullable;
 
+import java.util.Optional;
+
 /** {@link RequestBody} to trigger savepoints. */
 public class SavepointTriggerRequestBody implements RequestBody {
 
     public static final String FIELD_NAME_TARGET_DIRECTORY = "target-directory";
 
     private static final String FIELD_NAME_CANCEL_JOB = "cancel-job";
 
+    private static final String FIELD_NAME_TRIGGER_ID = "triggerId";
+
     @JsonProperty(FIELD_NAME_TARGET_DIRECTORY)
     @Nullable
     private final String targetDirectory;
 
     @JsonProperty(FIELD_NAME_CANCEL_JOB)
     private final boolean cancelJob;
 
+    @JsonProperty(FIELD_NAME_TRIGGER_ID)
+    @Nullable
+    private final TriggerId triggerId;
+
     @JsonCreator
     public SavepointTriggerRequestBody(
             @Nullable @JsonProperty(FIELD_NAME_TARGET_DIRECTORY) final String targetDirectory,
-            @Nullable @JsonProperty(FIELD_NAME_CANCEL_JOB) final Boolean cancelJob) {
+            @Nullable @JsonProperty(FIELD_NAME_CANCEL_JOB) final Boolean cancelJob,
+            @Nullable @JsonProperty(FIELD_NAME_TRIGGER_ID) TriggerId triggerId) {
         this.targetDirectory = targetDirectory;
         this.cancelJob = cancelJob != null ? cancelJob : false;
+        this.triggerId = triggerId;
     }
 
     @Nullable
     public String getTargetDirectory() {
         return targetDirectory;
     }
 
+    @JsonIgnore
+    public Optional<TriggerId> getTriggerId() {
+        return Optional.ofNullable(triggerId);
+    }

Review comment:
       I feel a bit uncomfortable that this is handled differently than `targetDirectory` which is also nullable but does not return an Optional. Not sure if it's worth it changing targetDirectory though as it's not related to this PR

##########
File path: docs/layouts/shortcodes/generated/rest_v1_dispatcher.html
##########
@@ -3260,6 +3260,9 @@
     },
     "target-directory" : {
       "type" : "string"
+    },
+    "triggerId" : {
+      "type" : "any"

Review comment:
       Ah, to answer my own question: Most likely because it's a `TriggerId`, not a `String`...




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] nicoweidner commented on a change in pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
nicoweidner commented on a change in pull request #17578:
URL: https://github.com/apache/flink/pull/17578#discussion_r741924689



##########
File path: docs/layouts/shortcodes/generated/rest_v1_dispatcher.html
##########
@@ -3260,6 +3260,9 @@
     },
     "target-directory" : {
       "type" : "string"
+    },
+    "triggerId" : {
+      "type" : "any"

Review comment:
       Why is this generated as `any` instead of `string`?

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/savepoints/stop/StopWithSavepointRequestBody.java
##########
@@ -19,32 +19,44 @@
 package org.apache.flink.runtime.rest.messages.job.savepoints.stop;
 
 import org.apache.flink.runtime.rest.messages.RequestBody;
+import org.apache.flink.runtime.rest.messages.TriggerId;
 
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
 import javax.annotation.Nullable;
 
+import java.util.Optional;
+
 /** {@link RequestBody} for stopping a job with a savepoint. */
 public class StopWithSavepointRequestBody implements RequestBody {
 
     public static final String FIELD_NAME_TARGET_DIRECTORY = "targetDirectory";

Review comment:
       Here, camel case is used for everything. So maybe that should be the standard :D

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/job/savepoints/SavepointTriggerRequestBodyTest.java
##########
@@ -44,8 +45,10 @@ public SavepointTriggerRequestBodyTest(
     public static Collection<Object[]> data() {
         return Arrays.asList(
                 new Object[][] {
-                    {new SavepointTriggerRequestBody("/tmp", true)},
-                    {new SavepointTriggerRequestBody("/tmp", false)}
+                    {new SavepointTriggerRequestBody("/tmp", true, null)},
+                    {new SavepointTriggerRequestBody("/tmp", false, null)},
+                    {new SavepointTriggerRequestBody("/tmp", true, new TriggerId())},
+                    {new SavepointTriggerRequestBody("/tmp", false, new TriggerId())},

Review comment:
       Is there a reason we have these tests for triggerSavepoint, but not stopWithSavepoint?

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/savepoints/StopWithSavepointHandlersTest.java
##########
@@ -213,20 +216,61 @@ public void testSavepointCompletedWithException() throws Exception {
         assertThat(savepointError, instanceOf(RuntimeException.class));
     }
 
+    @Test
+    public void testProvidedTriggerId() throws Exception {
+        final OperationResult<String> successfulResult =
+                OperationResult.success(COMPLETED_SAVEPOINT_EXTERNAL_POINTER);
+        AtomicReference<AsynchronousJobOperationKey> keyReference = new AtomicReference<>();
+        final TestingRestfulGateway testingRestfulGateway =
+                new TestingRestfulGateway.Builder()
+                        .setStopWithSavepointFunction(setReferenceToOperationKey(keyReference))
+                        .setGetSavepointStatusFunction(
+                                getResultIfKeyMatches(successfulResult, keyReference))
+                        .build();
+
+        final TriggerId providedTriggerId = new TriggerId();
+
+        final TriggerId returnedTriggerId =
+                savepointTriggerHandler
+                        .handleRequest(
+                                triggerSavepointRequest(
+                                        DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY,
+                                        providedTriggerId),
+                                testingRestfulGateway)
+                        .get()
+                        .getTriggerId();
+
+        assertEquals(providedTriggerId, returnedTriggerId);
+
+        AsynchronousOperationResult<SavepointInfo> savepointResponseBody;
+        savepointResponseBody =
+                savepointStatusHandler
+                        .handleRequest(
+                                savepointStatusRequest(providedTriggerId), testingRestfulGateway)
+                        .get();
+
+        assertThat(savepointResponseBody.queueStatus().getId(), equalTo(QueueStatus.Id.COMPLETED));
+        assertThat(savepointResponseBody.resource(), notNullValue());
+        assertThat(
+                savepointResponseBody.resource().getLocation(),
+                equalTo(COMPLETED_SAVEPOINT_EXTERNAL_POINTER));
+    }
+
     private static HandlerRequest<StopWithSavepointRequestBody> triggerSavepointRequest()
             throws HandlerRequestException {
-        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY);
+        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY, null);
     }
 
     private static HandlerRequest<StopWithSavepointRequestBody>
             triggerSavepointRequestWithDefaultDirectory() throws HandlerRequestException {
-        return triggerSavepointRequest(null);
+        return triggerSavepointRequest(null, null);
     }
 
     private static HandlerRequest<StopWithSavepointRequestBody> triggerSavepointRequest(
-            final String targetDirectory) throws HandlerRequestException {
+            final String targetDirectory, @Nullable TriggerId triggerId)

Review comment:
       Same comment about `@Nullable`

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/savepoints/SavepointTriggerRequestBody.java
##########
@@ -19,39 +19,56 @@
 package org.apache.flink.runtime.rest.messages.job.savepoints;
 
 import org.apache.flink.runtime.rest.messages.RequestBody;
+import org.apache.flink.runtime.rest.messages.TriggerId;
 
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
 import javax.annotation.Nullable;
 
+import java.util.Optional;
+
 /** {@link RequestBody} to trigger savepoints. */
 public class SavepointTriggerRequestBody implements RequestBody {
 
     public static final String FIELD_NAME_TARGET_DIRECTORY = "target-directory";
 
     private static final String FIELD_NAME_CANCEL_JOB = "cancel-job";
 
+    private static final String FIELD_NAME_TRIGGER_ID = "triggerId";

Review comment:
       Are we using camel case or something else, e.g. `target-directory` (kebab-case or whatever you call that)?

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/savepoints/SavepointHandlersTest.java
##########
@@ -208,20 +211,61 @@ public void testSavepointCompletedWithException() throws Exception {
         assertThat(savepointError, instanceOf(RuntimeException.class));
     }
 
+    @Test
+    public void testProvidedTriggerId() throws Exception {
+        final OperationResult<String> successfulResult =
+                OperationResult.success(COMPLETED_SAVEPOINT_EXTERNAL_POINTER);
+        AtomicReference<AsynchronousJobOperationKey> keyReference = new AtomicReference<>();
+        final TestingRestfulGateway testingRestfulGateway =
+                new TestingRestfulGateway.Builder()
+                        .setTriggerSavepointFunction(setReferenceToOperationKey(keyReference))
+                        .setGetSavepointStatusFunction(
+                                getResultIfKeyMatches(successfulResult, keyReference))
+                        .build();
+
+        final TriggerId providedTriggerId = new TriggerId();
+
+        final TriggerId returnedTriggerId =
+                savepointTriggerHandler
+                        .handleRequest(
+                                triggerSavepointRequest(
+                                        DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY,
+                                        providedTriggerId),
+                                testingRestfulGateway)
+                        .get()
+                        .getTriggerId();
+
+        assertEquals(providedTriggerId, returnedTriggerId);
+
+        AsynchronousOperationResult<SavepointInfo> savepointResponseBody;
+        savepointResponseBody =
+                savepointStatusHandler
+                        .handleRequest(
+                                savepointStatusRequest(providedTriggerId), testingRestfulGateway)
+                        .get();
+
+        assertThat(savepointResponseBody.queueStatus().getId(), equalTo(QueueStatus.Id.COMPLETED));
+        assertThat(savepointResponseBody.resource(), notNullValue());
+        assertThat(
+                savepointResponseBody.resource().getLocation(),
+                equalTo(COMPLETED_SAVEPOINT_EXTERNAL_POINTER));
+    }
+
     private static HandlerRequest<SavepointTriggerRequestBody> triggerSavepointRequest()
             throws HandlerRequestException {
-        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY);
+        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY, null);
     }
 
     private static HandlerRequest<SavepointTriggerRequestBody>
             triggerSavepointRequestWithDefaultDirectory() throws HandlerRequestException {
-        return triggerSavepointRequest(null);
+        return triggerSavepointRequest(null, null);
     }
 
     private static HandlerRequest<SavepointTriggerRequestBody> triggerSavepointRequest(
-            final String targetDirectory) throws HandlerRequestException {
+            final String targetDirectory, @Nullable TriggerId triggerId)

Review comment:
       Looking at the call just above, `targetDirectory` should probably have `@Nullable` as well

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/savepoints/SavepointTriggerRequestBody.java
##########
@@ -19,39 +19,56 @@
 package org.apache.flink.runtime.rest.messages.job.savepoints;
 
 import org.apache.flink.runtime.rest.messages.RequestBody;
+import org.apache.flink.runtime.rest.messages.TriggerId;
 
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
 import javax.annotation.Nullable;
 
+import java.util.Optional;
+
 /** {@link RequestBody} to trigger savepoints. */
 public class SavepointTriggerRequestBody implements RequestBody {
 
     public static final String FIELD_NAME_TARGET_DIRECTORY = "target-directory";
 
     private static final String FIELD_NAME_CANCEL_JOB = "cancel-job";
 
+    private static final String FIELD_NAME_TRIGGER_ID = "triggerId";
+
     @JsonProperty(FIELD_NAME_TARGET_DIRECTORY)
     @Nullable
     private final String targetDirectory;
 
     @JsonProperty(FIELD_NAME_CANCEL_JOB)
     private final boolean cancelJob;
 
+    @JsonProperty(FIELD_NAME_TRIGGER_ID)
+    @Nullable
+    private final TriggerId triggerId;
+
     @JsonCreator
     public SavepointTriggerRequestBody(
             @Nullable @JsonProperty(FIELD_NAME_TARGET_DIRECTORY) final String targetDirectory,
-            @Nullable @JsonProperty(FIELD_NAME_CANCEL_JOB) final Boolean cancelJob) {
+            @Nullable @JsonProperty(FIELD_NAME_CANCEL_JOB) final Boolean cancelJob,
+            @Nullable @JsonProperty(FIELD_NAME_TRIGGER_ID) TriggerId triggerId) {
         this.targetDirectory = targetDirectory;
         this.cancelJob = cancelJob != null ? cancelJob : false;
+        this.triggerId = triggerId;
     }
 
     @Nullable
     public String getTargetDirectory() {
         return targetDirectory;
     }
 
+    @JsonIgnore
+    public Optional<TriggerId> getTriggerId() {
+        return Optional.ofNullable(triggerId);
+    }

Review comment:
       I feel a bit uncomfortable that this is handled differently than `targetDirectory` which is also nullable but does not return an Optional. Not sure if it's worth it changing targetDirectory though as it's not related to this PR




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] nicoweidner commented on a change in pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
nicoweidner commented on a change in pull request #17578:
URL: https://github.com/apache/flink/pull/17578#discussion_r742076001



##########
File path: docs/layouts/shortcodes/generated/rest_v1_dispatcher.html
##########
@@ -3260,6 +3260,9 @@
     },
     "target-directory" : {
       "type" : "string"
+    },
+    "triggerId" : {
+      "type" : "any"

Review comment:
       Ah, to answer my own question: Most likely because it's a `TriggerId`, not a `String`...




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25933",
       "triggerID" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   * 47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930) 
   * 76bbcdb19cc62e0794d2f566e3553dfa0426d8a6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25933) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25933",
       "triggerID" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 76bbcdb19cc62e0794d2f566e3553dfa0426d8a6 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25933) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol merged pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
zentol merged pull request #17578:
URL: https://github.com/apache/flink/pull/17578


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268ecc036767d9ad8008ce4c22d1af7292824331 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268ecc036767d9ad8008ce4c22d1af7292824331 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508) 
   * 639b420be63844073345b89063cba258cc652f23 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   * 47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol merged pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
zentol merged pull request #17578:
URL: https://github.com/apache/flink/pull/17578


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol commented on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
zentol commented on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952728518


   Update to the rest API docs will be added shortly...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol commented on a change in pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #17578:
URL: https://github.com/apache/flink/pull/17578#discussion_r742624978



##########
File path: docs/layouts/shortcodes/generated/rest_v1_dispatcher.html
##########
@@ -3260,6 +3260,9 @@
     },
     "target-directory" : {
       "type" : "string"
+    },
+    "triggerId" : {
+      "type" : "any"

Review comment:
       No, because we use a custom serializer for better or worse, from which the schema generator cannot derive the actual structure.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   * 47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930) 
   * 76bbcdb19cc62e0794d2f566e3553dfa0426d8a6 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] nicoweidner commented on a change in pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
nicoweidner commented on a change in pull request #17578:
URL: https://github.com/apache/flink/pull/17578#discussion_r741924689



##########
File path: docs/layouts/shortcodes/generated/rest_v1_dispatcher.html
##########
@@ -3260,6 +3260,9 @@
     },
     "target-directory" : {
       "type" : "string"
+    },
+    "triggerId" : {
+      "type" : "any"

Review comment:
       Why is this generated as `any` instead of `string`?

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/savepoints/stop/StopWithSavepointRequestBody.java
##########
@@ -19,32 +19,44 @@
 package org.apache.flink.runtime.rest.messages.job.savepoints.stop;
 
 import org.apache.flink.runtime.rest.messages.RequestBody;
+import org.apache.flink.runtime.rest.messages.TriggerId;
 
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
 import javax.annotation.Nullable;
 
+import java.util.Optional;
+
 /** {@link RequestBody} for stopping a job with a savepoint. */
 public class StopWithSavepointRequestBody implements RequestBody {
 
     public static final String FIELD_NAME_TARGET_DIRECTORY = "targetDirectory";

Review comment:
       Here, camel case is used for everything. So maybe that should be the standard :D

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/job/savepoints/SavepointTriggerRequestBodyTest.java
##########
@@ -44,8 +45,10 @@ public SavepointTriggerRequestBodyTest(
     public static Collection<Object[]> data() {
         return Arrays.asList(
                 new Object[][] {
-                    {new SavepointTriggerRequestBody("/tmp", true)},
-                    {new SavepointTriggerRequestBody("/tmp", false)}
+                    {new SavepointTriggerRequestBody("/tmp", true, null)},
+                    {new SavepointTriggerRequestBody("/tmp", false, null)},
+                    {new SavepointTriggerRequestBody("/tmp", true, new TriggerId())},
+                    {new SavepointTriggerRequestBody("/tmp", false, new TriggerId())},

Review comment:
       Is there a reason we have these tests for triggerSavepoint, but not stopWithSavepoint?

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/savepoints/StopWithSavepointHandlersTest.java
##########
@@ -213,20 +216,61 @@ public void testSavepointCompletedWithException() throws Exception {
         assertThat(savepointError, instanceOf(RuntimeException.class));
     }
 
+    @Test
+    public void testProvidedTriggerId() throws Exception {
+        final OperationResult<String> successfulResult =
+                OperationResult.success(COMPLETED_SAVEPOINT_EXTERNAL_POINTER);
+        AtomicReference<AsynchronousJobOperationKey> keyReference = new AtomicReference<>();
+        final TestingRestfulGateway testingRestfulGateway =
+                new TestingRestfulGateway.Builder()
+                        .setStopWithSavepointFunction(setReferenceToOperationKey(keyReference))
+                        .setGetSavepointStatusFunction(
+                                getResultIfKeyMatches(successfulResult, keyReference))
+                        .build();
+
+        final TriggerId providedTriggerId = new TriggerId();
+
+        final TriggerId returnedTriggerId =
+                savepointTriggerHandler
+                        .handleRequest(
+                                triggerSavepointRequest(
+                                        DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY,
+                                        providedTriggerId),
+                                testingRestfulGateway)
+                        .get()
+                        .getTriggerId();
+
+        assertEquals(providedTriggerId, returnedTriggerId);
+
+        AsynchronousOperationResult<SavepointInfo> savepointResponseBody;
+        savepointResponseBody =
+                savepointStatusHandler
+                        .handleRequest(
+                                savepointStatusRequest(providedTriggerId), testingRestfulGateway)
+                        .get();
+
+        assertThat(savepointResponseBody.queueStatus().getId(), equalTo(QueueStatus.Id.COMPLETED));
+        assertThat(savepointResponseBody.resource(), notNullValue());
+        assertThat(
+                savepointResponseBody.resource().getLocation(),
+                equalTo(COMPLETED_SAVEPOINT_EXTERNAL_POINTER));
+    }
+
     private static HandlerRequest<StopWithSavepointRequestBody> triggerSavepointRequest()
             throws HandlerRequestException {
-        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY);
+        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY, null);
     }
 
     private static HandlerRequest<StopWithSavepointRequestBody>
             triggerSavepointRequestWithDefaultDirectory() throws HandlerRequestException {
-        return triggerSavepointRequest(null);
+        return triggerSavepointRequest(null, null);
     }
 
     private static HandlerRequest<StopWithSavepointRequestBody> triggerSavepointRequest(
-            final String targetDirectory) throws HandlerRequestException {
+            final String targetDirectory, @Nullable TriggerId triggerId)

Review comment:
       Same comment about `@Nullable`

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/savepoints/SavepointTriggerRequestBody.java
##########
@@ -19,39 +19,56 @@
 package org.apache.flink.runtime.rest.messages.job.savepoints;
 
 import org.apache.flink.runtime.rest.messages.RequestBody;
+import org.apache.flink.runtime.rest.messages.TriggerId;
 
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
 import javax.annotation.Nullable;
 
+import java.util.Optional;
+
 /** {@link RequestBody} to trigger savepoints. */
 public class SavepointTriggerRequestBody implements RequestBody {
 
     public static final String FIELD_NAME_TARGET_DIRECTORY = "target-directory";
 
     private static final String FIELD_NAME_CANCEL_JOB = "cancel-job";
 
+    private static final String FIELD_NAME_TRIGGER_ID = "triggerId";

Review comment:
       Are we using camel case or something else, e.g. `target-directory` (kebab-case or whatever you call that)?

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/savepoints/SavepointHandlersTest.java
##########
@@ -208,20 +211,61 @@ public void testSavepointCompletedWithException() throws Exception {
         assertThat(savepointError, instanceOf(RuntimeException.class));
     }
 
+    @Test
+    public void testProvidedTriggerId() throws Exception {
+        final OperationResult<String> successfulResult =
+                OperationResult.success(COMPLETED_SAVEPOINT_EXTERNAL_POINTER);
+        AtomicReference<AsynchronousJobOperationKey> keyReference = new AtomicReference<>();
+        final TestingRestfulGateway testingRestfulGateway =
+                new TestingRestfulGateway.Builder()
+                        .setTriggerSavepointFunction(setReferenceToOperationKey(keyReference))
+                        .setGetSavepointStatusFunction(
+                                getResultIfKeyMatches(successfulResult, keyReference))
+                        .build();
+
+        final TriggerId providedTriggerId = new TriggerId();
+
+        final TriggerId returnedTriggerId =
+                savepointTriggerHandler
+                        .handleRequest(
+                                triggerSavepointRequest(
+                                        DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY,
+                                        providedTriggerId),
+                                testingRestfulGateway)
+                        .get()
+                        .getTriggerId();
+
+        assertEquals(providedTriggerId, returnedTriggerId);
+
+        AsynchronousOperationResult<SavepointInfo> savepointResponseBody;
+        savepointResponseBody =
+                savepointStatusHandler
+                        .handleRequest(
+                                savepointStatusRequest(providedTriggerId), testingRestfulGateway)
+                        .get();
+
+        assertThat(savepointResponseBody.queueStatus().getId(), equalTo(QueueStatus.Id.COMPLETED));
+        assertThat(savepointResponseBody.resource(), notNullValue());
+        assertThat(
+                savepointResponseBody.resource().getLocation(),
+                equalTo(COMPLETED_SAVEPOINT_EXTERNAL_POINTER));
+    }
+
     private static HandlerRequest<SavepointTriggerRequestBody> triggerSavepointRequest()
             throws HandlerRequestException {
-        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY);
+        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY, null);
     }
 
     private static HandlerRequest<SavepointTriggerRequestBody>
             triggerSavepointRequestWithDefaultDirectory() throws HandlerRequestException {
-        return triggerSavepointRequest(null);
+        return triggerSavepointRequest(null, null);
     }
 
     private static HandlerRequest<SavepointTriggerRequestBody> triggerSavepointRequest(
-            final String targetDirectory) throws HandlerRequestException {
+            final String targetDirectory, @Nullable TriggerId triggerId)

Review comment:
       Looking at the call just above, `targetDirectory` should probably have `@Nullable` as well

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/savepoints/SavepointTriggerRequestBody.java
##########
@@ -19,39 +19,56 @@
 package org.apache.flink.runtime.rest.messages.job.savepoints;
 
 import org.apache.flink.runtime.rest.messages.RequestBody;
+import org.apache.flink.runtime.rest.messages.TriggerId;
 
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
 import javax.annotation.Nullable;
 
+import java.util.Optional;
+
 /** {@link RequestBody} to trigger savepoints. */
 public class SavepointTriggerRequestBody implements RequestBody {
 
     public static final String FIELD_NAME_TARGET_DIRECTORY = "target-directory";
 
     private static final String FIELD_NAME_CANCEL_JOB = "cancel-job";
 
+    private static final String FIELD_NAME_TRIGGER_ID = "triggerId";
+
     @JsonProperty(FIELD_NAME_TARGET_DIRECTORY)
     @Nullable
     private final String targetDirectory;
 
     @JsonProperty(FIELD_NAME_CANCEL_JOB)
     private final boolean cancelJob;
 
+    @JsonProperty(FIELD_NAME_TRIGGER_ID)
+    @Nullable
+    private final TriggerId triggerId;
+
     @JsonCreator
     public SavepointTriggerRequestBody(
             @Nullable @JsonProperty(FIELD_NAME_TARGET_DIRECTORY) final String targetDirectory,
-            @Nullable @JsonProperty(FIELD_NAME_CANCEL_JOB) final Boolean cancelJob) {
+            @Nullable @JsonProperty(FIELD_NAME_CANCEL_JOB) final Boolean cancelJob,
+            @Nullable @JsonProperty(FIELD_NAME_TRIGGER_ID) TriggerId triggerId) {
         this.targetDirectory = targetDirectory;
         this.cancelJob = cancelJob != null ? cancelJob : false;
+        this.triggerId = triggerId;
     }
 
     @Nullable
     public String getTargetDirectory() {
         return targetDirectory;
     }
 
+    @JsonIgnore
+    public Optional<TriggerId> getTriggerId() {
+        return Optional.ofNullable(triggerId);
+    }

Review comment:
       I feel a bit uncomfortable that this is handled differently than `targetDirectory` which is also nullable but does not return an Optional. Not sure if it's worth it changing targetDirectory though as it's not related to this PR

##########
File path: docs/layouts/shortcodes/generated/rest_v1_dispatcher.html
##########
@@ -3260,6 +3260,9 @@
     },
     "target-directory" : {
       "type" : "string"
+    },
+    "triggerId" : {
+      "type" : "any"

Review comment:
       Ah, to answer my own question: Most likely because it's a `TriggerId`, not a `String`...

##########
File path: docs/layouts/shortcodes/generated/rest_v1_dispatcher.html
##########
@@ -3260,6 +3260,9 @@
     },
     "target-directory" : {
       "type" : "string"
+    },
+    "triggerId" : {
+      "type" : "any"

Review comment:
       Why is this generated as `any` instead of `string`?

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/savepoints/stop/StopWithSavepointRequestBody.java
##########
@@ -19,32 +19,44 @@
 package org.apache.flink.runtime.rest.messages.job.savepoints.stop;
 
 import org.apache.flink.runtime.rest.messages.RequestBody;
+import org.apache.flink.runtime.rest.messages.TriggerId;
 
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
 import javax.annotation.Nullable;
 
+import java.util.Optional;
+
 /** {@link RequestBody} for stopping a job with a savepoint. */
 public class StopWithSavepointRequestBody implements RequestBody {
 
     public static final String FIELD_NAME_TARGET_DIRECTORY = "targetDirectory";

Review comment:
       Here, camel case is used for everything. So maybe that should be the standard :D

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/job/savepoints/SavepointTriggerRequestBodyTest.java
##########
@@ -44,8 +45,10 @@ public SavepointTriggerRequestBodyTest(
     public static Collection<Object[]> data() {
         return Arrays.asList(
                 new Object[][] {
-                    {new SavepointTriggerRequestBody("/tmp", true)},
-                    {new SavepointTriggerRequestBody("/tmp", false)}
+                    {new SavepointTriggerRequestBody("/tmp", true, null)},
+                    {new SavepointTriggerRequestBody("/tmp", false, null)},
+                    {new SavepointTriggerRequestBody("/tmp", true, new TriggerId())},
+                    {new SavepointTriggerRequestBody("/tmp", false, new TriggerId())},

Review comment:
       Is there a reason we have these tests for triggerSavepoint, but not stopWithSavepoint?

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/savepoints/StopWithSavepointHandlersTest.java
##########
@@ -213,20 +216,61 @@ public void testSavepointCompletedWithException() throws Exception {
         assertThat(savepointError, instanceOf(RuntimeException.class));
     }
 
+    @Test
+    public void testProvidedTriggerId() throws Exception {
+        final OperationResult<String> successfulResult =
+                OperationResult.success(COMPLETED_SAVEPOINT_EXTERNAL_POINTER);
+        AtomicReference<AsynchronousJobOperationKey> keyReference = new AtomicReference<>();
+        final TestingRestfulGateway testingRestfulGateway =
+                new TestingRestfulGateway.Builder()
+                        .setStopWithSavepointFunction(setReferenceToOperationKey(keyReference))
+                        .setGetSavepointStatusFunction(
+                                getResultIfKeyMatches(successfulResult, keyReference))
+                        .build();
+
+        final TriggerId providedTriggerId = new TriggerId();
+
+        final TriggerId returnedTriggerId =
+                savepointTriggerHandler
+                        .handleRequest(
+                                triggerSavepointRequest(
+                                        DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY,
+                                        providedTriggerId),
+                                testingRestfulGateway)
+                        .get()
+                        .getTriggerId();
+
+        assertEquals(providedTriggerId, returnedTriggerId);
+
+        AsynchronousOperationResult<SavepointInfo> savepointResponseBody;
+        savepointResponseBody =
+                savepointStatusHandler
+                        .handleRequest(
+                                savepointStatusRequest(providedTriggerId), testingRestfulGateway)
+                        .get();
+
+        assertThat(savepointResponseBody.queueStatus().getId(), equalTo(QueueStatus.Id.COMPLETED));
+        assertThat(savepointResponseBody.resource(), notNullValue());
+        assertThat(
+                savepointResponseBody.resource().getLocation(),
+                equalTo(COMPLETED_SAVEPOINT_EXTERNAL_POINTER));
+    }
+
     private static HandlerRequest<StopWithSavepointRequestBody> triggerSavepointRequest()
             throws HandlerRequestException {
-        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY);
+        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY, null);
     }
 
     private static HandlerRequest<StopWithSavepointRequestBody>
             triggerSavepointRequestWithDefaultDirectory() throws HandlerRequestException {
-        return triggerSavepointRequest(null);
+        return triggerSavepointRequest(null, null);
     }
 
     private static HandlerRequest<StopWithSavepointRequestBody> triggerSavepointRequest(
-            final String targetDirectory) throws HandlerRequestException {
+            final String targetDirectory, @Nullable TriggerId triggerId)

Review comment:
       Same comment about `@Nullable`

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/savepoints/SavepointTriggerRequestBody.java
##########
@@ -19,39 +19,56 @@
 package org.apache.flink.runtime.rest.messages.job.savepoints;
 
 import org.apache.flink.runtime.rest.messages.RequestBody;
+import org.apache.flink.runtime.rest.messages.TriggerId;
 
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
 import javax.annotation.Nullable;
 
+import java.util.Optional;
+
 /** {@link RequestBody} to trigger savepoints. */
 public class SavepointTriggerRequestBody implements RequestBody {
 
     public static final String FIELD_NAME_TARGET_DIRECTORY = "target-directory";
 
     private static final String FIELD_NAME_CANCEL_JOB = "cancel-job";
 
+    private static final String FIELD_NAME_TRIGGER_ID = "triggerId";

Review comment:
       Are we using camel case or something else, e.g. `target-directory` (kebab-case or whatever you call that)?

##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/savepoints/SavepointHandlersTest.java
##########
@@ -208,20 +211,61 @@ public void testSavepointCompletedWithException() throws Exception {
         assertThat(savepointError, instanceOf(RuntimeException.class));
     }
 
+    @Test
+    public void testProvidedTriggerId() throws Exception {
+        final OperationResult<String> successfulResult =
+                OperationResult.success(COMPLETED_SAVEPOINT_EXTERNAL_POINTER);
+        AtomicReference<AsynchronousJobOperationKey> keyReference = new AtomicReference<>();
+        final TestingRestfulGateway testingRestfulGateway =
+                new TestingRestfulGateway.Builder()
+                        .setTriggerSavepointFunction(setReferenceToOperationKey(keyReference))
+                        .setGetSavepointStatusFunction(
+                                getResultIfKeyMatches(successfulResult, keyReference))
+                        .build();
+
+        final TriggerId providedTriggerId = new TriggerId();
+
+        final TriggerId returnedTriggerId =
+                savepointTriggerHandler
+                        .handleRequest(
+                                triggerSavepointRequest(
+                                        DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY,
+                                        providedTriggerId),
+                                testingRestfulGateway)
+                        .get()
+                        .getTriggerId();
+
+        assertEquals(providedTriggerId, returnedTriggerId);
+
+        AsynchronousOperationResult<SavepointInfo> savepointResponseBody;
+        savepointResponseBody =
+                savepointStatusHandler
+                        .handleRequest(
+                                savepointStatusRequest(providedTriggerId), testingRestfulGateway)
+                        .get();
+
+        assertThat(savepointResponseBody.queueStatus().getId(), equalTo(QueueStatus.Id.COMPLETED));
+        assertThat(savepointResponseBody.resource(), notNullValue());
+        assertThat(
+                savepointResponseBody.resource().getLocation(),
+                equalTo(COMPLETED_SAVEPOINT_EXTERNAL_POINTER));
+    }
+
     private static HandlerRequest<SavepointTriggerRequestBody> triggerSavepointRequest()
             throws HandlerRequestException {
-        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY);
+        return triggerSavepointRequest(DEFAULT_REQUESTED_SAVEPOINT_TARGET_DIRECTORY, null);
     }
 
     private static HandlerRequest<SavepointTriggerRequestBody>
             triggerSavepointRequestWithDefaultDirectory() throws HandlerRequestException {
-        return triggerSavepointRequest(null);
+        return triggerSavepointRequest(null, null);
     }
 
     private static HandlerRequest<SavepointTriggerRequestBody> triggerSavepointRequest(
-            final String targetDirectory) throws HandlerRequestException {
+            final String targetDirectory, @Nullable TriggerId triggerId)

Review comment:
       Looking at the call just above, `targetDirectory` should probably have `@Nullable` as well

##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/savepoints/SavepointTriggerRequestBody.java
##########
@@ -19,39 +19,56 @@
 package org.apache.flink.runtime.rest.messages.job.savepoints;
 
 import org.apache.flink.runtime.rest.messages.RequestBody;
+import org.apache.flink.runtime.rest.messages.TriggerId;
 
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
 import javax.annotation.Nullable;
 
+import java.util.Optional;
+
 /** {@link RequestBody} to trigger savepoints. */
 public class SavepointTriggerRequestBody implements RequestBody {
 
     public static final String FIELD_NAME_TARGET_DIRECTORY = "target-directory";
 
     private static final String FIELD_NAME_CANCEL_JOB = "cancel-job";
 
+    private static final String FIELD_NAME_TRIGGER_ID = "triggerId";
+
     @JsonProperty(FIELD_NAME_TARGET_DIRECTORY)
     @Nullable
     private final String targetDirectory;
 
     @JsonProperty(FIELD_NAME_CANCEL_JOB)
     private final boolean cancelJob;
 
+    @JsonProperty(FIELD_NAME_TRIGGER_ID)
+    @Nullable
+    private final TriggerId triggerId;
+
     @JsonCreator
     public SavepointTriggerRequestBody(
             @Nullable @JsonProperty(FIELD_NAME_TARGET_DIRECTORY) final String targetDirectory,
-            @Nullable @JsonProperty(FIELD_NAME_CANCEL_JOB) final Boolean cancelJob) {
+            @Nullable @JsonProperty(FIELD_NAME_CANCEL_JOB) final Boolean cancelJob,
+            @Nullable @JsonProperty(FIELD_NAME_TRIGGER_ID) TriggerId triggerId) {
         this.targetDirectory = targetDirectory;
         this.cancelJob = cancelJob != null ? cancelJob : false;
+        this.triggerId = triggerId;
     }
 
     @Nullable
     public String getTargetDirectory() {
         return targetDirectory;
     }
 
+    @JsonIgnore
+    public Optional<TriggerId> getTriggerId() {
+        return Optional.ofNullable(triggerId);
+    }

Review comment:
       I feel a bit uncomfortable that this is handled differently than `targetDirectory` which is also nullable but does not return an Optional. Not sure if it's worth it changing targetDirectory though as it's not related to this PR

##########
File path: docs/layouts/shortcodes/generated/rest_v1_dispatcher.html
##########
@@ -3260,6 +3260,9 @@
     },
     "target-directory" : {
       "type" : "string"
+    },
+    "triggerId" : {
+      "type" : "any"

Review comment:
       Ah, to answer my own question: Most likely because it's a `TriggerId`, not a `String`...




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268ecc036767d9ad8008ce4c22d1af7292824331 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508) 
   * 639b420be63844073345b89063cba258cc652f23 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol merged pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
zentol merged pull request #17578:
URL: https://github.com/apache/flink/pull/17578


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268ecc036767d9ad8008ce4c22d1af7292824331 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508) 
   * 639b420be63844073345b89063cba258cc652f23 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268ecc036767d9ad8008ce4c22d1af7292824331 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   * 47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930) 
   * 76bbcdb19cc62e0794d2f566e3553dfa0426d8a6 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   * 47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930) 
   * 76bbcdb19cc62e0794d2f566e3553dfa0426d8a6 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol commented on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
zentol commented on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-953193742


   @flinkbot run azure


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 268ecc036767d9ad8008ce4c22d1af7292824331 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] zentol commented on a change in pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #17578:
URL: https://github.com/apache/flink/pull/17578#discussion_r742630557



##########
File path: flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/savepoints/stop/StopWithSavepointRequestBody.java
##########
@@ -19,32 +19,44 @@
 package org.apache.flink.runtime.rest.messages.job.savepoints.stop;
 
 import org.apache.flink.runtime.rest.messages.RequestBody;
+import org.apache.flink.runtime.rest.messages.TriggerId;
 
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
+import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonIgnore;
 import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonProperty;
 
 import javax.annotation.Nullable;
 
+import java.util.Optional;
+
 /** {@link RequestBody} for stopping a job with a savepoint. */
 public class StopWithSavepointRequestBody implements RequestBody {
 
     public static final String FIELD_NAME_TARGET_DIRECTORY = "targetDirectory";

Review comment:
       It is. They are just kept for backwards compatibility.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   * 47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930) 
   * 76bbcdb19cc62e0794d2f566e3553dfa0426d8a6 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 639b420be63844073345b89063cba258cc652f23 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511) 
   * 47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [flink] flinkbot edited a comment on pull request #17578: [FLINK-24208][rest] Support user-supplied Savepoint triggerId

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #17578:
URL: https://github.com/apache/flink/pull/17578#issuecomment-952731483


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25508",
       "triggerID" : "268ecc036767d9ad8008ce4c22d1af7292824331",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "639b420be63844073345b89063cba258cc652f23",
       "triggerType" : "PUSH"
     }, {
       "hash" : "639b420be63844073345b89063cba258cc652f23",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25511",
       "triggerID" : "953193742",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930",
       "triggerID" : "47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25933",
       "triggerID" : "76bbcdb19cc62e0794d2f566e3553dfa0426d8a6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 47a58e7ad7f73ed9afc030b2c8e8517ae2c36c85 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25930) 
   * 76bbcdb19cc62e0794d2f566e3553dfa0426d8a6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=25933) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org