You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "XComp (via GitHub)" <gi...@apache.org> on 2024/01/12 16:03:21 UTC

[PR] [FLINK-34070][test] Adds dedicated tests in MiniClusterITCase for scenarios where there are not enough slots available. [flink]

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

   ## What is the purpose of the change
   
   See FLINK-34070 for more context on this change.
   
   ## Brief change log
   
   * Adds dedicated test for no-resource-available handling through timeout
   * Adds dedicated test for no-resource-available handling a request from the ResourceManager (and disabled it for the AdaptiveScheduler since it's not supported)
   
   ## Verifying this change
   
   * Two CI runs with DefaultScheduler and AdaptiveScheduler enabled
   
   ## 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: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - 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


Re: [PR] [FLINK-34070][test] Adds dedicated tests in MiniClusterITCase for scenarios where there are not enough slots available. [flink]

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


##########
tools/azure-pipelines/build-apache-repo.yml:
##########
@@ -73,6 +73,17 @@ stages:
           run_end_to_end: false
           container: flink-build-container
           jdk: 8
+      - template: jobs-template.yml
+        parameters:
+          stage_name: ci-adaptive-scheduler
+          test_pool_definition:
+            name: Default
+          e2e_pool_definition:
+            vmImage: 'ubuntu-20.04'
+          environment: PROFILE="-Penable-adaptive-scheduler"

Review Comment:
   Thanks for the explanation, I don't have any other questions.



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


Re: [PR] [FLINK-34070][test] Adds dedicated tests in MiniClusterITCase for scenarios where there are not enough slots available. [flink]

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


##########
tools/azure-pipelines/build-apache-repo.yml:
##########
@@ -73,6 +73,17 @@ stages:
           run_end_to_end: false
           container: flink-build-container
           jdk: 8
+      - template: jobs-template.yml
+        parameters:
+          stage_name: ci-adaptive-scheduler
+          test_pool_definition:
+            name: Default
+          e2e_pool_definition:
+            vmImage: 'ubuntu-20.04'
+          environment: PROFILE="-Penable-adaptive-scheduler"

Review Comment:
   Shall we add the `-Dflink.hadoop.version=2.10.2` in the profile to keep consistency with other stages? We can also remove the profile from other stages If `2.10.2` is the default value.



##########
flink-runtime/src/test/java/org/apache/flink/runtime/minicluster/MiniClusterITCase.java:
##########
@@ -149,7 +174,15 @@ private void runHandleJobsWhenNotEnoughSlots(final JobGraph jobGraph) throws Exc
         try (final MiniCluster miniCluster = new MiniCluster(cfg)) {
             miniCluster.start();
 
-            miniCluster.executeJobBlocking(jobGraph);
+            assertThatThrownBy(() -> miniCluster.executeJobBlocking(jobGraph))
+                    .isInstanceOf(JobExecutionException.class)
+                    .hasMessageContaining("Job execution failed")
+                    .extracting(Throwable::getCause)
+                    .extracting(FlinkAssertions::chainOfCauses, FlinkAssertions.STREAM_THROWABLE)
+                    .anySatisfy(
+                            cause ->
+                                    assertThat(cause)
+                                            .isInstanceOf(NoResourceAvailableException.class));

Review Comment:
   Would it be more explicit if we assert the TimeoutException is thrown when running `testHandlingNotEnoughSlotsThroughTimeout` with the default scheduler?



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


Re: [PR] [FLINK-34070][test] Adds dedicated tests in MiniClusterITCase for scenarios where there are not enough slots available. [flink]

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

   Thanks for the review @jiangxin369 and for the approval @snuyanzin . I'm gonna merge this one. The failure is caused by FLINK-34077 and, therefore, unrelated. I verified that the one test is disabled locally. :+1: 


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


Re: [PR] [FLINK-34070][test] Adds dedicated tests in MiniClusterITCase for scenarios where there are not enough slots available. [flink]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "44d3183ada4a4a65444f1ceba66ce83d3079dbba",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "44d3183ada4a4a65444f1ceba66ce83d3079dbba",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 44d3183ada4a4a65444f1ceba66ce83d3079dbba 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


Re: [PR] [FLINK-34070][test] Adds dedicated tests in MiniClusterITCase for scenarios where there are not enough slots available. [flink]

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


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


Re: [PR] [FLINK-34070][test] Adds dedicated tests in MiniClusterITCase for scenarios where there are not enough slots available. [flink]

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


##########
flink-runtime/src/test/java/org/apache/flink/runtime/minicluster/MiniClusterITCase.java:
##########
@@ -149,7 +174,15 @@ private void runHandleJobsWhenNotEnoughSlots(final JobGraph jobGraph) throws Exc
         try (final MiniCluster miniCluster = new MiniCluster(cfg)) {
             miniCluster.start();
 
-            miniCluster.executeJobBlocking(jobGraph);
+            assertThatThrownBy(() -> miniCluster.executeJobBlocking(jobGraph))
+                    .isInstanceOf(JobExecutionException.class)
+                    .hasMessageContaining("Job execution failed")
+                    .extracting(Throwable::getCause)
+                    .extracting(FlinkAssertions::chainOfCauses, FlinkAssertions.STREAM_THROWABLE)
+                    .anySatisfy(
+                            cause ->
+                                    assertThat(cause)
+                                            .isInstanceOf(NoResourceAvailableException.class));

Review Comment:
   You're right, it would be more explicit. But `MiniClusterITCase` is an integration test. Here, the relevant check should be to verify that we run into a `NoResourceAvailableException`. I consider the `TimeoutException` an implementation detail. Especially because it's not implemented like that in the `AdaptiveScheduler`. Having additional tests to cover that would be out-of-scope for an integration test and should be covered in a unit test in my opinion.



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


Re: [PR] [FLINK-34070][test] Adds dedicated tests in MiniClusterITCase for scenarios where there are not enough slots available. [flink]

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


##########
tools/azure-pipelines/build-apache-repo.yml:
##########
@@ -73,6 +73,17 @@ stages:
           run_end_to_end: false
           container: flink-build-container
           jdk: 8
+      - template: jobs-template.yml
+        parameters:
+          stage_name: ci-adaptive-scheduler
+          test_pool_definition:
+            name: Default
+          e2e_pool_definition:
+            vmImage: 'ubuntu-20.04'
+          environment: PROFILE="-Penable-adaptive-scheduler"

Review Comment:
   tbh, I don't know why CI doesn't pick up this PR. The profile configuration will be aligned with the migration to GitHub Actions ([FLIP-360](https://cwiki.apache.org/confluence/display/FLINK/FLIP-396%3A+Trial+to+test+GitHub+Actions+as+an+alternative+for+Flink's+current+Azure+CI+infrastructure)). I don't put any effort into Azure Pipelines anymore. :innocent: 



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