You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/03/06 04:49:45 UTC

[GitHub] [incubator-yunikorn-core] steinsgateted opened a new pull request #380: [Yunikorn 1093] Track rejected applications

steinsgateted opened a new pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380


   ### What is this PR for?
   Display rejected applications information in REST.
   ### What type of PR is it?
   * [ ] - Bug Fix
   * [x] - Improvement
   * [ ] - Feature
   * [ ] - Documentation
   * [ ] - Hot Fix
   * [ ] - Refactoring
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   https://issues.apache.org/jira/projects/YUNIKORN/issues/YUNIKORN-1093
   
   ### How should this be tested?
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * [ ] - The licenses files need update.
   * [ ] - There is breaking changes for older versions.
   * [ ] - It needs documentation.
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] wilfred-s commented on a change in pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
wilfred-s commented on a change in pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#discussion_r821333550



##########
File path: pkg/scheduler/objects/application.go
##########
@@ -1507,3 +1509,22 @@ func (sa *Application) IsAllocationAssignedToApp(alloc *Allocation) bool {
 	_, ok := sa.allocations[alloc.UUID]
 	return ok
 }
+
+func (sa *Application) SetRejectionMessage(rejectionMessage string) {
+	sa.Lock()
+	defer sa.Unlock()
+	sa.rejectionMessage = rejectionMessage
+}
+
+func (sa *Application) GetRejectionMessage() string {
+	sa.RLock()
+	defer sa.RUnlock()
+	return sa.rejectionMessage
+}
+
+// only for rejected application
+func (sa *Application) SetFinishedTime() {
+	sa.Lock()
+	defer sa.Unlock()
+	sa.finishedTime = time.Now()

Review comment:
       Add test coverage in `TestFinishedTime()`

##########
File path: pkg/scheduler/objects/application.go
##########
@@ -1507,3 +1509,22 @@ func (sa *Application) IsAllocationAssignedToApp(alloc *Allocation) bool {
 	_, ok := sa.allocations[alloc.UUID]
 	return ok
 }
+
+func (sa *Application) SetRejectionMessage(rejectionMessage string) {
+	sa.Lock()
+	defer sa.Unlock()
+	sa.rejectionMessage = rejectionMessage
+}
+
+func (sa *Application) GetRejectionMessage() string {
+	sa.RLock()
+	defer sa.RUnlock()
+	return sa.rejectionMessage

Review comment:
       Should add test coverage, specially when setting the message from the state change

##########
File path: pkg/webservice/handlers.go
##########
@@ -129,6 +129,9 @@ func getApplicationsInfo(w http.ResponseWriter, r *http.Request) {
 		for _, app := range partition.GetCompletedApplications() {
 			addDao(app)
 		}
+		for _, app := range partition.GetRejectedApplications() {
+			addDao(app)
+		}

Review comment:
       Can we add a test in the `handler_test` to cover this?

##########
File path: pkg/scheduler/context.go
##########
@@ -503,6 +503,11 @@ func (cc *ClusterContext) handleRMUpdateApplicationEvent(event *rmevent.RMUpdate
 				ApplicationID: app.ApplicationID,
 				Reason:        err.Error(),
 			})
+			rejectedApp := objects.NewApplication(app, ugi, cc.rmEventHandler, request.RmID)
+			stateChangeErr := partition.addRejectedApplication(rejectedApp, err.Error())

Review comment:
       We do not need to store this in a local var, just pass in directly into the call.
   Also see comment below around the signature for `addRejectedApplication`

##########
File path: pkg/scheduler/partition.go
##########
@@ -1445,3 +1490,19 @@ func (pc *PartitionContext) hasUnlimitedNode() bool {
 	}
 	return false
 }
+
+func (pc *PartitionContext) addRejectedApplication(rejectedApplication *objects.Application, rejectionMessage string) error {
+	if err := rejectedApplication.HandleApplicationEvent(objects.RejectApplication); err != nil {
+		log.Logger().Warn("Application state not changed to Rejected",
+			zap.String("currentState", rejectedApplication.CurrentState()),
+			zap.Error(err))
+		return err
+	}

Review comment:
       Why are you returning this error? There is nothing that we can do with the error outside of this function. It also looks like it break processing of the message in the calling function.
   This change should also never fail. Change this to something like `log.Logger().Warn("BUG: Unexpected failure...` and continue processing. Do not return the error.
   
   NOTE: calling the event system will also call `OnStateChange()` as we enter a new state. That triggers an event to the shim to be created. That event has the wrong info in it as we do not want pass it back as an updated application. We need to filter out RejectApplication state changes.

##########
File path: pkg/scheduler/partition.go
##########
@@ -443,6 +444,13 @@ func (pc *PartitionContext) getApplication(appID string) *objects.Application {
 	return pc.applications[appID]
 }
 
+func (pc *PartitionContext) getRejectedApplication(appID string) *objects.Application {
+	pc.RLock()
+	defer pc.RUnlock()
+
+	return pc.rejectedApplications[appID]
+}
+

Review comment:
       This is just used once in a test, in the line above in the test we directly check the map. Accessing the map in the test directly should be OK.

##########
File path: pkg/scheduler/partition.go
##########
@@ -1445,3 +1490,19 @@ func (pc *PartitionContext) hasUnlimitedNode() bool {
 	}
 	return false
 }
+
+func (pc *PartitionContext) addRejectedApplication(rejectedApplication *objects.Application, rejectionMessage string) error {
+	if err := rejectedApplication.HandleApplicationEvent(objects.RejectApplication); err != nil {
+		log.Logger().Warn("Application state not changed to Rejected",
+			zap.String("currentState", rejectedApplication.CurrentState()),
+			zap.Error(err))
+		return err
+	}
+	rejectedApplication.SetFinishedTime()
+	rejectedApplication.SetRejectionMessage(rejectionMessage)

Review comment:
       Why do we not wrap this up in the state change call?
   You already set the state timer in that call why not add these two to that action.
   We also would not need functions to set these values in that case as the application object can not be accessed by anything yet.




-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] codecov[bot] edited a comment on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059897161


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#380](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3aa67c5) into [master](https://codecov.io/gh/apache/incubator-yunikorn-core/commit/dbfefaaf6db70d726e0192068428a517dd9bd449?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dbfefaa) will **decrease** coverage by `0.00%`.
   > The diff coverage is `75.64%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/graphs/tree.svg?width=650&height=150&src=pr&token=SB9NrIi3Hy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #380      +/-   ##
   ==========================================
   - Coverage   69.38%   69.37%   -0.01%     
   ==========================================
     Files          66       66              
     Lines        9409     9468      +59     
   ==========================================
   + Hits         6528     6568      +40     
   - Misses       2638     2656      +18     
   - Partials      243      244       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/scheduler/context.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9jb250ZXh0Lmdv) | `32.02% <0.00%> (-0.10%)` | :arrow_down: |
   | [pkg/scheduler/partition\_manager.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb25fbWFuYWdlci5nbw==) | `72.00% <ø> (ø)` | |
   | [pkg/scheduler/partition.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb24uZ28=) | `74.20% <69.76%> (-0.19%)` | :arrow_down: |
   | [pkg/scheduler/objects/application.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uLmdv) | `57.47% <81.81%> (-0.18%)` | :arrow_down: |
   | [pkg/scheduler/objects/application\_state.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uX3N0YXRlLmdv) | `100.00% <100.00%> (ø)` | |
   | [pkg/webservice/handlers.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3dlYnNlcnZpY2UvaGFuZGxlcnMuZ28=) | `75.81% <100.00%> (+0.14%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [dbfefaa...3aa67c5](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] codecov[bot] edited a comment on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059897161


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#380](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3aa67c5) into [master](https://codecov.io/gh/apache/incubator-yunikorn-core/commit/dbfefaaf6db70d726e0192068428a517dd9bd449?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dbfefaa) will **decrease** coverage by `0.00%`.
   > The diff coverage is `75.64%`.
   
   > :exclamation: Current head 3aa67c5 differs from pull request most recent head 1c77b9a. Consider uploading reports for the commit 1c77b9a to get more accurate results
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/graphs/tree.svg?width=650&height=150&src=pr&token=SB9NrIi3Hy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #380      +/-   ##
   ==========================================
   - Coverage   69.38%   69.37%   -0.01%     
   ==========================================
     Files          66       66              
     Lines        9409     9468      +59     
   ==========================================
   + Hits         6528     6568      +40     
   - Misses       2638     2656      +18     
   - Partials      243      244       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/scheduler/context.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9jb250ZXh0Lmdv) | `32.02% <0.00%> (-0.10%)` | :arrow_down: |
   | [pkg/scheduler/partition\_manager.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb25fbWFuYWdlci5nbw==) | `72.00% <ø> (ø)` | |
   | [pkg/scheduler/partition.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb24uZ28=) | `74.20% <69.76%> (-0.19%)` | :arrow_down: |
   | [pkg/scheduler/objects/application.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uLmdv) | `57.47% <81.81%> (-0.18%)` | :arrow_down: |
   | [pkg/scheduler/objects/application\_state.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uX3N0YXRlLmdv) | `100.00% <100.00%> (ø)` | |
   | [pkg/webservice/handlers.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3dlYnNlcnZpY2UvaGFuZGxlcnMuZ28=) | `75.81% <100.00%> (+0.14%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [dbfefaa...1c77b9a](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] codecov[bot] edited a comment on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059897161


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#380](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1c77b9a) into [master](https://codecov.io/gh/apache/incubator-yunikorn-core/commit/dbfefaaf6db70d726e0192068428a517dd9bd449?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dbfefaa) will **increase** coverage by `0.03%`.
   > The diff coverage is `80.76%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/graphs/tree.svg?width=650&height=150&src=pr&token=SB9NrIi3Hy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #380      +/-   ##
   ==========================================
   + Coverage   69.38%   69.41%   +0.03%     
   ==========================================
     Files          66       66              
     Lines        9409     9468      +59     
   ==========================================
   + Hits         6528     6572      +44     
   - Misses       2638     2652      +14     
   - Partials      243      244       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/scheduler/context.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9jb250ZXh0Lmdv) | `32.02% <0.00%> (-0.10%)` | :arrow_down: |
   | [pkg/scheduler/partition\_manager.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb25fbWFuYWdlci5nbw==) | `72.00% <ø> (ø)` | |
   | [pkg/scheduler/partition.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb24uZ28=) | `74.20% <69.76%> (-0.19%)` | :arrow_down: |
   | [pkg/scheduler/objects/application.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uLmdv) | `57.85% <100.00%> (+0.19%)` | :arrow_up: |
   | [pkg/scheduler/objects/application\_state.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uX3N0YXRlLmdv) | `100.00% <100.00%> (ø)` | |
   | [pkg/webservice/handlers.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3dlYnNlcnZpY2UvaGFuZGxlcnMuZ28=) | `75.81% <100.00%> (+0.14%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [dbfefaa...1c77b9a](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] wilfred-s closed pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
wilfred-s closed pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380


   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] steinsgateted edited a comment on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
steinsgateted edited a comment on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059901365


   If the app is rejected, display this message in /ws/v1/apps :
   ```
   [
     {
       "applicationID": "application-sleep-0003",
       "usedResource": "[]",
       "maxUsedResource": "[]",
       "partition": "default",
       "queueName": "",
       "submissionTime": 1646541113515060500,
       "finishedTime": 1646541113515105300,
       "allocations": [],
       "applicationState": "Rejected",
       "user": "nobody",
       "rejectionMessage": "failed to place application application-sleep-0003: application rejected: no placment rule matched"
     }
   ]
   ```
   Because the rejected app was not added to the queue, there is no information in /ws/v1/partition/{partitioName}/queue/{queueName}/applications.
   
   In `pkg/scheduler/context.go` `handleRMUpdateApplicationEvent `func, if partition != nil , then save app to pc.rejectedApplications.
   
   Reuse finishedTime to record reject timestamp.
   
   In `pkg/scheduler/objects/application_state.go`, add a rejected to expire state transition.
   
   In `pkg/scheduler/partition.go`, add a GetRejectedAppsByState func to find expired apps in rejected applications.
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] steinsgateted edited a comment on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
steinsgateted edited a comment on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059901365


   If the app is rejected, display this message in /ws/v1/apps :
   ```
   [
     {
       "applicationID": "application-sleep-0003",
       "usedResource": "[]",
       "maxUsedResource": "[]",
       "partition": "default",
       "queueName": "",
       "submissionTime": 1646757410878163500,
       "finishedTime": 1646757410878225400,
       "allocations": [],
       "applicationState": "Rejected",
       "user": "nobody",
       "rejectedMessage": "failed to place application application-sleep-0003: application rejected: no placment rule matched"
     }
   ]
   ```
   Because the rejected app was not added to the queue, there is no information in `/ws/v1/partition/{partitioName}/queue/{queueName}/applications`.
   
   In `pkg/scheduler/context.go` `handleRMUpdateApplicationEvent `func, if partition != nil , then save app to pc.rejectedApplications.
   
   Because rejected apps won't go to `UnSetQueue()`, reuse `finishedTime `to record reject timestamp.
   
   In `pkg/scheduler/objects/application_state.go`, add a rejected to expire state transition.
   
   In `pkg/scheduler/partition.go`, add a `GetRejectedAppsByState `func to find expired apps in rejected applications.
   
   There are two questions:
   1. In `/ws/v1/partition/{partitioName}/queue/{queueName}/applications`, no rejected app information.
   2. When the partition is nil, the rejected app has no save.


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] steinsgateted commented on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
steinsgateted commented on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059901365


   If the app is rejected, display this message in /ws/v1/apps :
   ```
   [
     {
       "applicationID": "application-sleep-0003",
       "usedResource": "[]",
       "maxUsedResource": "[]",
       "partition": "default",
       "queueName": "",
       "submissionTime": 1646541113515060500,
       "finishedTime": 1646541113515105300,
       "allocations": [],
       "applicationState": "Rejected",
       "user": "nobody",
       "rejectionMessage": "failed to place application application-sleep-0003: application rejected: no placment rule matched"
     }
   ]
   ```
   Because the rejected app was not added to the queue, there is no information in /ws/v1/partition/{partitioName}/queue/{queueName}/applications.


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] steinsgateted edited a comment on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
steinsgateted edited a comment on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059901365


   If the app is rejected, display this message in /ws/v1/apps :
   ```
   [
     {
       "applicationID": "application-sleep-0003",
       "usedResource": "[]",
       "maxUsedResource": "[]",
       "partition": "default",
       "queueName": "",
       "submissionTime": 1646541113515060500,
       "finishedTime": 1646541113515105300,
       "allocations": [],
       "applicationState": "Rejected",
       "user": "nobody",
       "rejectionMessage": "failed to place application application-sleep-0003: application rejected: no placment rule matched"
     }
   ]
   ```
   Because the rejected app was not added to the queue, there is no information in `/ws/v1/partition/{partitioName}/queue/{queueName}/applications`.
   
   In `pkg/scheduler/context.go` `handleRMUpdateApplicationEvent `func, if partition != nil , then save app to pc.rejectedApplications.
   
   Because rejected apps won't go to `UnSetQueue()`, reuse `finishedTime `to record reject timestamp.
   
   In `pkg/scheduler/objects/application_state.go`, add a rejected to expire state transition.
   
   In `pkg/scheduler/partition.go`, add a `GetRejectedAppsByState `func to find expired apps in rejected applications.
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] codecov[bot] commented on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059897161


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#380](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b75629a) into [master](https://codecov.io/gh/apache/incubator-yunikorn-core/commit/127b9792e6e592d91817d3352ae34232f2f8f952?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (127b979) will **decrease** coverage by `0.16%`.
   > The diff coverage is `49.33%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/graphs/tree.svg?width=650&height=150&src=pr&token=SB9NrIi3Hy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #380      +/-   ##
   ==========================================
   - Coverage   69.46%   69.30%   -0.17%     
   ==========================================
     Files          66       66              
     Lines        9397     9471      +74     
   ==========================================
   + Hits         6528     6564      +36     
   - Misses       2626     2662      +36     
   - Partials      243      245       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/scheduler/context.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9jb250ZXh0Lmdv) | `31.83% <0.00%> (-0.44%)` | :arrow_down: |
   | [pkg/scheduler/partition\_manager.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb25fbWFuYWdlci5nbw==) | `72.00% <ø> (ø)` | |
   | [pkg/scheduler/objects/application.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uLmdv) | `57.05% <7.69%> (-0.61%)` | :arrow_down: |
   | [pkg/webservice/handlers.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3dlYnNlcnZpY2UvaGFuZGxlcnMuZ28=) | `75.37% <25.00%> (-0.31%)` | :arrow_down: |
   | [pkg/scheduler/partition.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb24uZ28=) | `74.21% <70.21%> (-0.19%)` | :arrow_down: |
   | [pkg/scheduler/objects/application\_state.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uX3N0YXRlLmdv) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [127b979...b75629a](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] codecov[bot] edited a comment on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059897161


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#380](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (19a1826) into [master](https://codecov.io/gh/apache/incubator-yunikorn-core/commit/dbfefaaf6db70d726e0192068428a517dd9bd449?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dbfefaa) will **decrease** coverage by `0.01%`.
   > The diff coverage is `57.33%`.
   
   > :exclamation: Current head 19a1826 differs from pull request most recent head 526180e. Consider uploading reports for the commit 526180e to get more accurate results
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/graphs/tree.svg?width=650&height=150&src=pr&token=SB9NrIi3Hy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #380      +/-   ##
   ==========================================
   - Coverage   69.38%   69.36%   -0.02%     
   ==========================================
     Files          66       66              
     Lines        9409     9471      +62     
   ==========================================
   + Hits         6528     6570      +42     
   - Misses       2638     2657      +19     
   - Partials      243      244       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/scheduler/context.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9jb250ZXh0Lmdv) | `31.83% <0.00%> (-0.29%)` | :arrow_down: |
   | [pkg/scheduler/partition\_manager.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb25fbWFuYWdlci5nbw==) | `72.00% <ø> (ø)` | |
   | [pkg/scheduler/objects/application.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uLmdv) | `57.05% <7.69%> (-0.61%)` | :arrow_down: |
   | [pkg/webservice/handlers.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3dlYnNlcnZpY2UvaGFuZGxlcnMuZ28=) | `75.37% <25.00%> (-0.31%)` | :arrow_down: |
   | [pkg/scheduler/partition.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb24uZ28=) | `74.76% <82.97%> (+0.37%)` | :arrow_up: |
   | [pkg/scheduler/objects/application\_state.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uX3N0YXRlLmdv) | `100.00% <100.00%> (ø)` | |
   | [pkg/scheduler/scheduler.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9zY2hlZHVsZXIuZ28=) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [dbfefaa...526180e](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] steinsgateted edited a comment on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
steinsgateted edited a comment on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059901365


   If the app is rejected, display this message in /ws/v1/apps :
   ```
   [
     {
       "applicationID": "application-sleep-0003",
       "usedResource": "[]",
       "maxUsedResource": "[]",
       "partition": "default",
       "queueName": "",
       "submissionTime": 1646541113515060500,
       "finishedTime": 1646541113515105300,
       "allocations": [],
       "applicationState": "Rejected",
       "user": "nobody",
       "rejectionMessage": "failed to place application application-sleep-0003: application rejected: no placment rule matched"
     }
   ]
   ```
   Because the rejected app was not added to the queue, there is no information in `/ws/v1/partition/{partitioName}/queue/{queueName}/applications`.
   
   In `pkg/scheduler/context.go` `handleRMUpdateApplicationEvent `func, if partition != nil , then save app to pc.rejectedApplications.
   
   Because rejected apps won't go to `UnSetQueue()`, reuse `finishedTime `to record reject timestamp.
   
   In `pkg/scheduler/objects/application_state.go`, add a rejected to expire state transition.
   
   In `pkg/scheduler/partition.go`, add a `GetRejectedAppsByState `func to find expired apps in rejected applications.
   
   There are two questions:
   1. In `/ws/v1/partition/{partitioName}/queue/{queueName}/applications`, no rejected app information.
   2. When the partition is nil, the rejected app has no save.


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] steinsgateted edited a comment on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
steinsgateted edited a comment on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059901365


   If the app is rejected, display this message in /ws/v1/apps :
   ```
   [
     {
       "applicationID": "application-sleep-0003",
       "usedResource": "[]",
       "maxUsedResource": "[]",
       "partition": "default",
       "queueName": "",
       "submissionTime": 1646541113515060500,
       "finishedTime": 1646541113515105300,
       "allocations": [],
       "applicationState": "Rejected",
       "user": "nobody",
       "rejectionMessage": "failed to place application application-sleep-0003: application rejected: no placment rule matched"
     }
   ]
   ```
   Because the rejected app was not added to the queue, there is no information in `/ws/v1/partition/{partitioName}/queue/{queueName}/applications`.
   
   In `pkg/scheduler/context.go` `handleRMUpdateApplicationEvent `func, if partition != nil , then save app to pc.rejectedApplications.
   
   Because rejected apps won't go to UnSetQueue(), reuse `finishedTime `to record reject timestamp.
   
   In `pkg/scheduler/objects/application_state.go`, add a rejected to expire state transition.
   
   In `pkg/scheduler/partition.go`, add a `GetRejectedAppsByState `func to find expired apps in rejected applications.
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] codecov[bot] edited a comment on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059897161


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#380](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b75629a) into [master](https://codecov.io/gh/apache/incubator-yunikorn-core/commit/127b9792e6e592d91817d3352ae34232f2f8f952?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (127b979) will **decrease** coverage by `0.16%`.
   > The diff coverage is `49.33%`.
   
   > :exclamation: Current head b75629a differs from pull request most recent head 19a1826. Consider uploading reports for the commit 19a1826 to get more accurate results
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/graphs/tree.svg?width=650&height=150&src=pr&token=SB9NrIi3Hy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #380      +/-   ##
   ==========================================
   - Coverage   69.46%   69.30%   -0.17%     
   ==========================================
     Files          66       66              
     Lines        9397     9471      +74     
   ==========================================
   + Hits         6528     6564      +36     
   - Misses       2626     2662      +36     
   - Partials      243      245       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/scheduler/context.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9jb250ZXh0Lmdv) | `31.83% <0.00%> (-0.44%)` | :arrow_down: |
   | [pkg/scheduler/partition\_manager.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb25fbWFuYWdlci5nbw==) | `72.00% <ø> (ø)` | |
   | [pkg/scheduler/objects/application.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uLmdv) | `57.05% <7.69%> (-0.61%)` | :arrow_down: |
   | [pkg/webservice/handlers.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3dlYnNlcnZpY2UvaGFuZGxlcnMuZ28=) | `75.37% <25.00%> (-0.31%)` | :arrow_down: |
   | [pkg/scheduler/partition.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb24uZ28=) | `74.21% <70.21%> (-0.19%)` | :arrow_down: |
   | [pkg/scheduler/objects/application\_state.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uX3N0YXRlLmdv) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [127b979...19a1826](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] wilfred-s commented on a change in pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
wilfred-s commented on a change in pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#discussion_r821336887



##########
File path: pkg/scheduler/partition.go
##########
@@ -1445,3 +1490,19 @@ func (pc *PartitionContext) hasUnlimitedNode() bool {
 	}
 	return false
 }
+
+func (pc *PartitionContext) addRejectedApplication(rejectedApplication *objects.Application, rejectionMessage string) error {
+	if err := rejectedApplication.HandleApplicationEvent(objects.RejectApplication); err != nil {
+		log.Logger().Warn("Application state not changed to Rejected",
+			zap.String("currentState", rejectedApplication.CurrentState()),
+			zap.Error(err))
+		return err
+	}

Review comment:
       Why are you returning this error? There is nothing that we can do with the error outside of this function. It also looks like it break processing of the message in the calling function.
   This change should also never fail. Change this to something like `log.Logger().Warn("BUG: Unexpected failure...` and continue processing. Do not return the error.
   
   NOTE: calling the event system will also call `OnStateChange()` as we enter a new state. That triggers an event creation which is sent to the shim. That event has the wrong info in it. We do not want to pass this application back as an updated application. We need to filter out RejectApplication state changes.




-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] codecov[bot] edited a comment on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059897161


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#380](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (19a1826) into [master](https://codecov.io/gh/apache/incubator-yunikorn-core/commit/dbfefaaf6db70d726e0192068428a517dd9bd449?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dbfefaa) will **decrease** coverage by `0.01%`.
   > The diff coverage is `57.33%`.
   
   > :exclamation: Current head 19a1826 differs from pull request most recent head 3aa67c5. Consider uploading reports for the commit 3aa67c5 to get more accurate results
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/graphs/tree.svg?width=650&height=150&src=pr&token=SB9NrIi3Hy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #380      +/-   ##
   ==========================================
   - Coverage   69.38%   69.36%   -0.02%     
   ==========================================
     Files          66       66              
     Lines        9409     9471      +62     
   ==========================================
   + Hits         6528     6570      +42     
   - Misses       2638     2657      +19     
   - Partials      243      244       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/scheduler/context.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9jb250ZXh0Lmdv) | `31.83% <0.00%> (-0.29%)` | :arrow_down: |
   | [pkg/scheduler/partition\_manager.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb25fbWFuYWdlci5nbw==) | `72.00% <ø> (ø)` | |
   | [pkg/scheduler/objects/application.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uLmdv) | `57.05% <7.69%> (-0.61%)` | :arrow_down: |
   | [pkg/webservice/handlers.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3dlYnNlcnZpY2UvaGFuZGxlcnMuZ28=) | `75.37% <25.00%> (-0.31%)` | :arrow_down: |
   | [pkg/scheduler/partition.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb24uZ28=) | `74.76% <82.97%> (+0.37%)` | :arrow_up: |
   | [pkg/scheduler/objects/application\_state.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uX3N0YXRlLmdv) | `100.00% <100.00%> (ø)` | |
   | [pkg/scheduler/scheduler.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9zY2hlZHVsZXIuZ28=) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [dbfefaa...3aa67c5](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] codecov[bot] edited a comment on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059897161


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#380](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (19a1826) into [master](https://codecov.io/gh/apache/incubator-yunikorn-core/commit/127b9792e6e592d91817d3352ae34232f2f8f952?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (127b979) will **decrease** coverage by `0.09%`.
   > The diff coverage is `57.33%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/graphs/tree.svg?width=650&height=150&src=pr&token=SB9NrIi3Hy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #380      +/-   ##
   ==========================================
   - Coverage   69.46%   69.36%   -0.10%     
   ==========================================
     Files          66       66              
     Lines        9397     9471      +74     
   ==========================================
   + Hits         6528     6570      +42     
   - Misses       2626     2657      +31     
   - Partials      243      244       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/scheduler/context.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9jb250ZXh0Lmdv) | `31.83% <0.00%> (-0.44%)` | :arrow_down: |
   | [pkg/scheduler/partition\_manager.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb25fbWFuYWdlci5nbw==) | `72.00% <ø> (ø)` | |
   | [pkg/scheduler/objects/application.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uLmdv) | `57.05% <7.69%> (-0.61%)` | :arrow_down: |
   | [pkg/webservice/handlers.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3dlYnNlcnZpY2UvaGFuZGxlcnMuZ28=) | `75.37% <25.00%> (-0.31%)` | :arrow_down: |
   | [pkg/scheduler/partition.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb24uZ28=) | `74.76% <82.97%> (+0.37%)` | :arrow_up: |
   | [pkg/scheduler/objects/application\_state.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uX3N0YXRlLmdv) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [127b979...19a1826](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] steinsgateted edited a comment on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
steinsgateted edited a comment on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059901365


   If the app is rejected, display this message in /ws/v1/apps :
   ```
   [
     {
       "applicationID": "application-sleep-0003",
       "usedResource": "[]",
       "maxUsedResource": "[]",
       "partition": "default",
       "queueName": "",
       "submissionTime": 1646541113515060500,
       "finishedTime": 1646541113515105300,
       "allocations": [],
       "applicationState": "Rejected",
       "user": "nobody",
       "rejectionMessage": "failed to place application application-sleep-0003: application rejected: no placment rule matched"
     }
   ]
   ```
   Because the rejected app was not added to the queue, there is no information in /ws/v1/partition/{partitioName}/queue/{queueName}/applications.
   
   In `pkg/scheduler/context.go` `handleRMUpdateApplicationEvent `func, if partition != nil , then save app to pc.rejectedApplications.
   
   Reuse finishedTime to record reject timestamp
   
   In `pkg/scheduler/objects/application_state.go`, add a rejected to expire state transition.
   
   In `pkg/scheduler/partition.go`, add a GetRejectedAppsByState func to find expired apps in rejected applications
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] steinsgateted commented on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
steinsgateted commented on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1061998087


   Thanks for your explanation.


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] codecov[bot] edited a comment on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059897161


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#380](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (19a1826) into [master](https://codecov.io/gh/apache/incubator-yunikorn-core/commit/dbfefaaf6db70d726e0192068428a517dd9bd449?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dbfefaa) will **decrease** coverage by `0.01%`.
   > The diff coverage is `57.33%`.
   
   > :exclamation: Current head 19a1826 differs from pull request most recent head 61b53ee. Consider uploading reports for the commit 61b53ee to get more accurate results
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/graphs/tree.svg?width=650&height=150&src=pr&token=SB9NrIi3Hy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #380      +/-   ##
   ==========================================
   - Coverage   69.38%   69.36%   -0.02%     
   ==========================================
     Files          66       66              
     Lines        9409     9471      +62     
   ==========================================
   + Hits         6528     6570      +42     
   - Misses       2638     2657      +19     
   - Partials      243      244       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/scheduler/context.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9jb250ZXh0Lmdv) | `31.83% <0.00%> (-0.29%)` | :arrow_down: |
   | [pkg/scheduler/partition\_manager.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb25fbWFuYWdlci5nbw==) | `72.00% <ø> (ø)` | |
   | [pkg/scheduler/objects/application.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uLmdv) | `57.05% <7.69%> (-0.61%)` | :arrow_down: |
   | [pkg/webservice/handlers.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3dlYnNlcnZpY2UvaGFuZGxlcnMuZ28=) | `75.37% <25.00%> (-0.31%)` | :arrow_down: |
   | [pkg/scheduler/partition.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb24uZ28=) | `74.76% <82.97%> (+0.37%)` | :arrow_up: |
   | [pkg/scheduler/objects/application\_state.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uX3N0YXRlLmdv) | `100.00% <100.00%> (ø)` | |
   | [pkg/scheduler/scheduler.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9zY2hlZHVsZXIuZ28=) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [dbfefaa...61b53ee](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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



[GitHub] [incubator-yunikorn-core] codecov[bot] edited a comment on pull request #380: [Yunikorn 1093] Track rejected applications

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #380:
URL: https://github.com/apache/incubator-yunikorn-core/pull/380#issuecomment-1059897161


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#380](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (19a1826) into [master](https://codecov.io/gh/apache/incubator-yunikorn-core/commit/dbfefaaf6db70d726e0192068428a517dd9bd449?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dbfefaa) will **decrease** coverage by `0.01%`.
   > The diff coverage is `57.33%`.
   
   > :exclamation: Current head 19a1826 differs from pull request most recent head 6a7e1c8. Consider uploading reports for the commit 6a7e1c8 to get more accurate results
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/graphs/tree.svg?width=650&height=150&src=pr&token=SB9NrIi3Hy&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #380      +/-   ##
   ==========================================
   - Coverage   69.38%   69.36%   -0.02%     
   ==========================================
     Files          66       66              
     Lines        9409     9471      +62     
   ==========================================
   + Hits         6528     6570      +42     
   - Misses       2638     2657      +19     
   - Partials      243      244       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [pkg/scheduler/context.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9jb250ZXh0Lmdv) | `31.83% <0.00%> (-0.29%)` | :arrow_down: |
   | [pkg/scheduler/partition\_manager.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb25fbWFuYWdlci5nbw==) | `72.00% <ø> (ø)` | |
   | [pkg/scheduler/objects/application.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uLmdv) | `57.05% <7.69%> (-0.61%)` | :arrow_down: |
   | [pkg/webservice/handlers.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3dlYnNlcnZpY2UvaGFuZGxlcnMuZ28=) | `75.37% <25.00%> (-0.31%)` | :arrow_down: |
   | [pkg/scheduler/partition.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9wYXJ0aXRpb24uZ28=) | `74.76% <82.97%> (+0.37%)` | :arrow_up: |
   | [pkg/scheduler/objects/application\_state.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uX3N0YXRlLmdv) | `100.00% <100.00%> (ø)` | |
   | [pkg/scheduler/scheduler.go](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9zY2hlZHVsZXIuZ28=) | `0.00% <0.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [dbfefaa...6a7e1c8](https://codecov.io/gh/apache/incubator-yunikorn-core/pull/380?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: reviews-unsubscribe@yunikorn.apache.org

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