You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by "homatthew (via GitHub)" <gi...@apache.org> on 2023/06/21 19:40:33 UTC

[GitHub] [gobblin] homatthew opened a new pull request, #3709: [GOBBLIN-1844] Ignore workflows marked for deletion when calculating …

homatthew opened a new pull request, #3709:
URL: https://github.com/apache/gobblin/pull/3709

   …container count
   
   Dear Gobblin maintainers,
   
   Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
   
   
   ### JIRA
   - [X] My PR addresses the following [Gobblin JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references them in the PR title. For example, "[GOBBLIN-1844] My Gobblin PR"
       - https://issues.apache.org/jira/browse/GOBBLIN-1844
   
   
   ### Description
   - [X] Here are some details about my PR, including screenshots (if applicable):
   When the `GobblinClusterManager` starts, it will do an asynchronous deletion of workflows (all workflow deletions are technically async). And we do not want the yarn service to acknowledge these workflows while the controller processes the request asynchronously. 
   
   When there is heavy load on the zookeeper cluster, the deletes will be slow and there will be significant overlap of having 2 of the same workflows 
   
   ### Tests
   - [X] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
   
   Modified existing unit to cover edge case of workflows that marked for deletion. Also refactored the testing code to improve the readability since there is a ton of copy paste involved for creating a workflow which is difficult to read
   
   ![image](https://github.com/apache/gobblin/assets/35702680/96f38f67-aae8-45c9-9867-6bc34a8cbef4)
   
   ### Commits
   - [X] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
       1. Subject is separated from body by a blank line
       2. Subject is limited to 50 characters
       3. Subject does not end with a period
       4. Subject uses the imperative mood ("add", not "adding")
       5. Body wraps at 72 characters
       6. Body explains "what" and "why", not "how"
   
   


-- 
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: dev-unsubscribe@gobblin.apache.org

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


[GitHub] [gobblin] ZihanLi58 merged pull request #3709: [GOBBLIN-1844] Ignore workflows marked for deletion when calculating container count

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


-- 
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: dev-unsubscribe@gobblin.apache.org

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


[GitHub] [gobblin] codecov-commenter commented on pull request #3709: [GOBBLIN-1844] Ignore workflows marked for deletion when calculating container count

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #3709:
URL: https://github.com/apache/gobblin/pull/3709#issuecomment-1604596293

   ## [Codecov](https://app.codecov.io/gh/apache/gobblin/pull/3709?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#3709](https://app.codecov.io/gh/apache/gobblin/pull/3709?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (33674da) into [master](https://app.codecov.io/gh/apache/gobblin/commit/fc508ca272cc2ea0a9f5cdd28e72f60ce3c7912b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (fc508ca) will **decrease** coverage by `2.12%`.
   > The diff coverage is `n/a`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #3709      +/-   ##
   ============================================
   - Coverage     46.87%   44.75%   -2.12%     
   + Complexity    10771     2098    -8673     
   ============================================
     Files          2138      411    -1727     
     Lines         84139    17734   -66405     
     Branches       9357     2162    -7195     
   ============================================
   - Hits          39436     7937   -31499     
   + Misses        41102     8937   -32165     
   + Partials       3601      860    -2741     
   ```
   
   
   [see 1735 files with indirect coverage changes](https://app.codecov.io/gh/apache/gobblin/pull/3709/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
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: dev-unsubscribe@gobblin.apache.org

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


[GitHub] [gobblin] ZihanLi58 commented on a diff in pull request #3709: [GOBBLIN-1844] Ignore workflows marked for deletion when calculating container count

Posted by "ZihanLi58 (via GitHub)" <gi...@apache.org>.
ZihanLi58 commented on code in PR #3709:
URL: https://github.com/apache/gobblin/pull/3709#discussion_r1239001875


##########
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnAutoScalingManager.java:
##########
@@ -220,16 +220,18 @@ void runInternal() {
       YarnContainerRequestBundle yarnContainerRequestBundle = new YarnContainerRequestBundle();
       for (Map.Entry<String, WorkflowConfig> workFlowEntry : taskDriver.getWorkflows().entrySet()) {
         WorkflowContext workflowContext = taskDriver.getWorkflowContext(workFlowEntry.getKey());
+        WorkflowConfig workflowConfig = workFlowEntry.getValue();
 
-        // Only allocate for active workflows
-        if (workflowContext == null || !workflowContext.getWorkflowState().equals(TaskState.IN_PROGRESS)) {
+        // Only allocate for active workflows and those not marked for delete

Review Comment:
   Can you add a comment here to explain that we won't release the container immediately as we allow containers to be idle for a specific time? 



-- 
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: dev-unsubscribe@gobblin.apache.org

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


[GitHub] [gobblin] homatthew commented on a diff in pull request #3709: [GOBBLIN-1844] Ignore workflows marked for deletion when calculating …

Posted by "homatthew (via GitHub)" <gi...@apache.org>.
homatthew commented on code in PR #3709:
URL: https://github.com/apache/gobblin/pull/3709#discussion_r1237601115


##########
gobblin-yarn/src/test/java/org/apache/gobblin/yarn/YarnAutoScalingManagerTest.java:
##########
@@ -223,117 +150,64 @@ public void testTwoWorkflows() throws IOException {
     runnable.run();
 
     // 5 containers requested and 3 workers in use
-    ArgumentCaptor<YarnContainerRequestBundle> argument = ArgumentCaptor.forClass(YarnContainerRequestBundle.class);
-    Mockito.verify(mockYarnService, times(1)).
-        requestTargetNumberOfContainers(argument.capture(),
-            eq(ImmutableSet.of("GobblinYarnTaskRunner-1", "GobblinYarnTaskRunner-2", "GobblinYarnTaskRunner-3")));
-    Assert.assertEquals(argument.getValue().getTotalContainers(), 5);
+    assertContainerRequest(mockYarnService, 5,
+        ImmutableSet.of("GobblinYarnTaskRunner-1", "GobblinYarnTaskRunner-2", "GobblinYarnTaskRunner-3"));
   }
 
   /**
-   * Test for two workflows with one not in progress.
-   * The partitions for the workflow that is not in progress should not be counted.
+   * Test for three workflows with one not in progress and one marked for delete.
+   * The partitions for the workflow that is not in progress or is marked for delete should not be counted.
    */
   @Test
-  public void testNotInProgress() throws IOException {
+  public void testNotInProgressOrBeingDeleted()  {

Review Comment:
   This is the test that covers the related `impl` changes. The changes in the other test methods are all refactors 



-- 
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: dev-unsubscribe@gobblin.apache.org

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