You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "gyfora (via GitHub)" <gi...@apache.org> on 2023/06/01 07:49:54 UTC

[GitHub] [flink] gyfora opened a new pull request, #22693: [FLINK-31974] Do not crash jobmanager on Kubernetes client errors

gyfora opened a new pull request, #22693:
URL: https://github.com/apache/flink/pull/22693

   ## What is the purpose of the change
   
   Recent changes cause the jobmanager to fail on kubernetes client errors while requesting resources. This is undesirable in most prod settings and we should restore the old retrying behaviour like Flink 1.16 and before.
   
   ## Brief change log
   
     - *Retry KubernetesClientExceptions*
     - *Add unit test*
   
   ## Verifying this change
   
   New unit test added.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: Kubernetes
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
   


-- 
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] gyfora commented on pull request #22693: [FLINK-31974] Do not crash jobmanager on Kubernetes client errors

Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora commented on PR #22693:
URL: https://github.com/apache/flink/pull/22693#issuecomment-1571535616

   cc @XComp 


-- 
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] reswqa commented on a diff in pull request #22693: [FLINK-31974] Do not crash jobmanager on Kubernetes client errors

Posted by "reswqa (via GitHub)" <gi...@apache.org>.
reswqa commented on code in PR #22693:
URL: https://github.com/apache/flink/pull/22693#discussion_r1212798930


##########
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/KubernetesResourceManagerDriverTest.java:
##########
@@ -223,6 +225,27 @@ void testFatalHandleError() throws Exception {
         };
     }
 
+    @Test
+    void testKubernetesExceptionHandling() throws Exception {
+        new Context() {
+            {
+                runTest(
+                        () -> {
+                            runInMainThread(
+                                            () -> {
+                                                getDriver()
+                                                        .requestResource(TASK_EXECUTOR_PROCESS_SPEC)
+                                                        .completeExceptionally(
+                                                                new CompletionException(
+                                                                        new KubernetesClientException(
+                                                                                "test")));
+                                            })
+                                    .get(TIMEOUT_SEC, TimeUnit.SECONDS);

Review Comment:
   nit: It's not very intuitive to assert that the future has not completed exceptionally via `.get(TIMEOUT_SEC, TimeUnit.SECONDS)`, how about directly using `future assertion`.
   ```
   runTest(
                           () ->
                                   FlinkAssertions.assertThatFuture(
                                                   runInMainThread(
                                                           () -> {
                                                               getDriver()
                                                                       .requestResource(
                                                                               TASK_EXECUTOR_PROCESS_SPEC)
                                                                       .completeExceptionally(
                                                                               new CompletionException(
                                                                                       new KubernetesClientException(
                                                                                               "test")));
                                                           }))
                                           .eventuallySucceeds());
   ```



-- 
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 #22693: [FLINK-31974] Do not crash jobmanager on Kubernetes client errors

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #22693:
URL: https://github.com/apache/flink/pull/22693#issuecomment-1571539013

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "badb060a997b3a30f019d181b3bf9c05dd942917",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "badb060a997b3a30f019d181b3bf9c05dd942917",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * badb060a997b3a30f019d181b3bf9c05dd942917 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] gyfora commented on a diff in pull request #22693: [FLINK-31974] Do not crash jobmanager on Kubernetes client errors

Posted by "gyfora (via GitHub)" <gi...@apache.org>.
gyfora commented on code in PR #22693:
URL: https://github.com/apache/flink/pull/22693#discussion_r1212819836


##########
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/KubernetesResourceManagerDriverTest.java:
##########
@@ -223,6 +225,27 @@ void testFatalHandleError() throws Exception {
         };
     }
 
+    @Test
+    void testKubernetesExceptionHandling() throws Exception {
+        new Context() {
+            {
+                runTest(
+                        () -> {
+                            runInMainThread(
+                                            () -> {
+                                                getDriver()
+                                                        .requestResource(TASK_EXECUTOR_PROCESS_SPEC)
+                                                        .completeExceptionally(
+                                                                new CompletionException(
+                                                                        new KubernetesClientException(
+                                                                                "test")));
+                                            })
+                                    .get(TIMEOUT_SEC, TimeUnit.SECONDS);

Review Comment:
   Yea that looks better, I will clean that up 👍 



-- 
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 #22693: [FLINK-31974] Do not crash jobmanager on Kubernetes client errors

Posted by "zentol (via GitHub)" <gi...@apache.org>.
zentol commented on PR #22693:
URL: https://github.com/apache/flink/pull/22693#issuecomment-1571569552

   FYI, @XComp is on vacation right now.


-- 
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] reswqa merged pull request #22693: [FLINK-31974] Do not crash jobmanager on Kubernetes client errors

Posted by "reswqa (via GitHub)" <gi...@apache.org>.
reswqa merged PR #22693:
URL: https://github.com/apache/flink/pull/22693


-- 
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