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/29 21:18:39 UTC
[GitHub] [yunikorn-core] craigcondit opened a new pull request #397: [YUNIKORN-1163] Return history of application state transitions in REST API
craigcondit opened a new pull request #397:
URL: https://github.com/apache/yunikorn-core/pull/397
### What is this PR for?
Expose application event transitions in the REST API as part of the application objects.
### 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/browse/YUNIKORN-1163
### How should this be tested?
Unit tests updated to verify event logs.
### 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] [yunikorn-core] wilfred-s commented on a change in pull request #397: [YUNIKORN-1163] Return history of application state transitions in REST API
Posted by GitBox <gi...@apache.org>.
wilfred-s commented on a change in pull request #397:
URL: https://github.com/apache/yunikorn-core/pull/397#discussion_r837996949
##########
File path: pkg/scheduler/objects/application.go
##########
@@ -142,6 +149,20 @@ func (sa *Application) SetState(state string) {
sa.stateMachine.SetState(state)
}
+func (sa *Application) recordEvent(time time.Time, appState string, prevState string) {
Review comment:
signature cleanup, make it a simple one argument call:
* time is always passed in as time.Now(), we can set it here. The nano second differences are not important.
* prevState is not used as the ordering provides the previous state already
--
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] [yunikorn-core] craigcondit commented on a change in pull request #397: [YUNIKORN-1163] Return history of application state transitions in REST API
Posted by GitBox <gi...@apache.org>.
craigcondit commented on a change in pull request #397:
URL: https://github.com/apache/yunikorn-core/pull/397#discussion_r838739876
##########
File path: pkg/scheduler/objects/application.go
##########
@@ -281,6 +303,9 @@ func (sa *Application) timeoutStateTimer(expectedState string, event application
sa.notifyRMAllocationReleased(sa.rmID, toRelease, si.TerminationType_TIMEOUT, "releasing placeholders on app complete")
sa.clearStateTimer()
} else {
+ // HandleApplicationEvent assumes the lock to be held
+ sa.Lock()
+ defer sa.Unlock()
Review comment:
Opened https://issues.apache.org/jira/browse/YUNIKORN-1164 to address these issues.
--
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] [yunikorn-core] codecov[bot] commented on pull request #397: [YUNIKORN-1163] Return history of application state transitions in REST API
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #397:
URL: https://github.com/apache/yunikorn-core/pull/397#issuecomment-1082388704
# [Codecov](https://codecov.io/gh/apache/yunikorn-core/pull/397?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 [#397](https://codecov.io/gh/apache/yunikorn-core/pull/397?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1909aac) into [master](https://codecov.io/gh/apache/yunikorn-core/commit/affcb27657a9794cf5ef3cacb9a38a59ba25a711?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (affcb27) will **increase** coverage by `0.05%`.
> The diff coverage is `100.00%`.
```diff
@@ Coverage Diff @@
## master #397 +/- ##
==========================================
+ Coverage 69.54% 69.60% +0.05%
==========================================
Files 67 67
Lines 9528 9553 +25
==========================================
+ Hits 6626 6649 +23
- Misses 2657 2658 +1
- Partials 245 246 +1
```
| [Impacted Files](https://codecov.io/gh/apache/yunikorn-core/pull/397?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/common/configs/config.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9jb25maWdzL2NvbmZpZy5nbw==) | `76.66% <ø> (ø)` | |
| [pkg/common/configs/configvalidator.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9jb25maWdzL2NvbmZpZ3ZhbGlkYXRvci5nbw==) | `86.97% <ø> (ø)` | |
| [pkg/common/configs/configwatcher.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9jb25maWdzL2NvbmZpZ3dhdGNoZXIuZ28=) | `85.71% <ø> (ø)` | |
| [pkg/common/resources/resources.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9yZXNvdXJjZXMvcmVzb3VyY2VzLmdv) | `97.68% <ø> (ø)` | |
| [pkg/common/security/acl.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9zZWN1cml0eS9hY2wuZ28=) | `84.14% <ø> (ø)` | |
| [pkg/common/security/usergroup.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9zZWN1cml0eS91c2VyZ3JvdXAuZ28=) | `85.71% <ø> (ø)` | |
| [pkg/common/server.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9zZXJ2ZXIuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/common/utils.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi91dGlscy5nbw==) | `71.01% <ø> (ø)` | |
| [pkg/events/event\_cache.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2V2ZW50cy9ldmVudF9jYWNoZS5nbw==) | `93.18% <ø> (ø)` | |
| [pkg/events/event\_publisher.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2V2ZW50cy9ldmVudF9wdWJsaXNoZXIuZ28=) | `92.59% <ø> (-7.41%)` | :arrow_down: |
| ... and [44 more](https://codecov.io/gh/apache/yunikorn-core/pull/397/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/yunikorn-core/pull/397?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/yunikorn-core/pull/397?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 [73d5528...1909aac](https://codecov.io/gh/apache/yunikorn-core/pull/397?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] [yunikorn-core] craigcondit closed pull request #397: [YUNIKORN-1163] Return history of application state transitions in REST API
Posted by GitBox <gi...@apache.org>.
craigcondit closed pull request #397:
URL: https://github.com/apache/yunikorn-core/pull/397
--
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] [yunikorn-core] craigcondit commented on a change in pull request #397: [YUNIKORN-1163] Return history of application state transitions in REST API
Posted by GitBox <gi...@apache.org>.
craigcondit commented on a change in pull request #397:
URL: https://github.com/apache/yunikorn-core/pull/397#discussion_r838733005
##########
File path: pkg/scheduler/objects/application.go
##########
@@ -53,6 +53,11 @@ const (
AppTagStateAwareDisable string = "application.stateaware.disable"
)
+type EventLogEntry struct {
+ EventTime time.Time
+ ApplicationState string
+}
Review comment:
Updated in new commit.
##########
File path: pkg/scheduler/objects/application.go
##########
@@ -80,6 +85,7 @@ type Application struct {
gangSchedulingStyle string // gang scheduling style can be hard (after timeout we fail the application), or soft (after timeeout we schedule it as a normal application)
finishedTime time.Time // the time of finishing this application. the default value is zero time
rejectedMessage string // If the application is rejected, save the rejected message
+ eventLog []*EventLogEntry // event log for this application
Review comment:
Updated in new commit.
##########
File path: pkg/scheduler/objects/application.go
##########
@@ -142,6 +149,20 @@ func (sa *Application) SetState(state string) {
sa.stateMachine.SetState(state)
}
+func (sa *Application) recordEvent(time time.Time, appState string, prevState string) {
Review comment:
Updated in new commit.
--
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] [yunikorn-core] codecov[bot] edited a comment on pull request #397: [YUNIKORN-1163] Return history of application state transitions in REST API
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #397:
URL: https://github.com/apache/yunikorn-core/pull/397#issuecomment-1082388704
# [Codecov](https://codecov.io/gh/apache/yunikorn-core/pull/397?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 [#397](https://codecov.io/gh/apache/yunikorn-core/pull/397?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (69e3f20) into [master](https://codecov.io/gh/apache/yunikorn-core/commit/affcb27657a9794cf5ef3cacb9a38a59ba25a711?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (affcb27) will **increase** coverage by `0.07%`.
> The diff coverage is `100.00%`.
```diff
@@ Coverage Diff @@
## master #397 +/- ##
==========================================
+ Coverage 69.54% 69.61% +0.07%
==========================================
Files 67 67
Lines 9528 9550 +22
==========================================
+ Hits 6626 6648 +22
Misses 2657 2657
Partials 245 245
```
| [Impacted Files](https://codecov.io/gh/apache/yunikorn-core/pull/397?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/common/configs/config.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9jb25maWdzL2NvbmZpZy5nbw==) | `76.66% <ø> (ø)` | |
| [pkg/common/configs/configvalidator.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9jb25maWdzL2NvbmZpZ3ZhbGlkYXRvci5nbw==) | `86.97% <ø> (ø)` | |
| [pkg/common/configs/configwatcher.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9jb25maWdzL2NvbmZpZ3dhdGNoZXIuZ28=) | `85.71% <ø> (ø)` | |
| [pkg/common/resources/resources.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9yZXNvdXJjZXMvcmVzb3VyY2VzLmdv) | `97.68% <ø> (ø)` | |
| [pkg/common/security/acl.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9zZWN1cml0eS9hY2wuZ28=) | `84.14% <ø> (ø)` | |
| [pkg/common/security/usergroup.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9zZWN1cml0eS91c2VyZ3JvdXAuZ28=) | `85.71% <ø> (ø)` | |
| [pkg/common/server.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9zZXJ2ZXIuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/common/utils.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi91dGlscy5nbw==) | `71.01% <ø> (ø)` | |
| [pkg/events/event\_cache.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2V2ZW50cy9ldmVudF9jYWNoZS5nbw==) | `93.18% <ø> (ø)` | |
| [pkg/events/event\_publisher.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2V2ZW50cy9ldmVudF9wdWJsaXNoZXIuZ28=) | `100.00% <ø> (ø)` | |
| ... and [43 more](https://codecov.io/gh/apache/yunikorn-core/pull/397/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/yunikorn-core/pull/397?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/yunikorn-core/pull/397?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 [73d5528...69e3f20](https://codecov.io/gh/apache/yunikorn-core/pull/397?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] [yunikorn-core] codecov[bot] edited a comment on pull request #397: [YUNIKORN-1163] Return history of application state transitions in REST API
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #397:
URL: https://github.com/apache/yunikorn-core/pull/397#issuecomment-1082388704
# [Codecov](https://codecov.io/gh/apache/yunikorn-core/pull/397?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 [#397](https://codecov.io/gh/apache/yunikorn-core/pull/397?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1909aac) into [master](https://codecov.io/gh/apache/yunikorn-core/commit/affcb27657a9794cf5ef3cacb9a38a59ba25a711?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (affcb27) will **increase** coverage by `0.05%`.
> The diff coverage is `100.00%`.
> :exclamation: Current head 1909aac differs from pull request most recent head 69e3f20. Consider uploading reports for the commit 69e3f20 to get more accurate results
```diff
@@ Coverage Diff @@
## master #397 +/- ##
==========================================
+ Coverage 69.54% 69.60% +0.05%
==========================================
Files 67 67
Lines 9528 9553 +25
==========================================
+ Hits 6626 6649 +23
- Misses 2657 2658 +1
- Partials 245 246 +1
```
| [Impacted Files](https://codecov.io/gh/apache/yunikorn-core/pull/397?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/common/configs/config.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9jb25maWdzL2NvbmZpZy5nbw==) | `76.66% <ø> (ø)` | |
| [pkg/common/configs/configvalidator.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9jb25maWdzL2NvbmZpZ3ZhbGlkYXRvci5nbw==) | `86.97% <ø> (ø)` | |
| [pkg/common/configs/configwatcher.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9jb25maWdzL2NvbmZpZ3dhdGNoZXIuZ28=) | `85.71% <ø> (ø)` | |
| [pkg/common/resources/resources.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9yZXNvdXJjZXMvcmVzb3VyY2VzLmdv) | `97.68% <ø> (ø)` | |
| [pkg/common/security/acl.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9zZWN1cml0eS9hY2wuZ28=) | `84.14% <ø> (ø)` | |
| [pkg/common/security/usergroup.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9zZWN1cml0eS91c2VyZ3JvdXAuZ28=) | `85.71% <ø> (ø)` | |
| [pkg/common/server.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi9zZXJ2ZXIuZ28=) | `0.00% <ø> (ø)` | |
| [pkg/common/utils.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2NvbW1vbi91dGlscy5nbw==) | `71.01% <ø> (ø)` | |
| [pkg/events/event\_cache.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2V2ZW50cy9ldmVudF9jYWNoZS5nbw==) | `93.18% <ø> (ø)` | |
| [pkg/events/event\_publisher.go](https://codecov.io/gh/apache/yunikorn-core/pull/397/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-cGtnL2V2ZW50cy9ldmVudF9wdWJsaXNoZXIuZ28=) | `92.59% <ø> (-7.41%)` | :arrow_down: |
| ... and [44 more](https://codecov.io/gh/apache/yunikorn-core/pull/397/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/yunikorn-core/pull/397?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/yunikorn-core/pull/397?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 [73d5528...69e3f20](https://codecov.io/gh/apache/yunikorn-core/pull/397?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] [yunikorn-core] wilfred-s commented on a change in pull request #397: [YUNIKORN-1163] Return history of application state transitions in REST API
Posted by GitBox <gi...@apache.org>.
wilfred-s commented on a change in pull request #397:
URL: https://github.com/apache/yunikorn-core/pull/397#discussion_r837996818
##########
File path: pkg/scheduler/objects/application.go
##########
@@ -53,6 +53,11 @@ const (
AppTagStateAwareDisable string = "application.stateaware.disable"
)
+type EventLogEntry struct {
+ EventTime time.Time
+ ApplicationState string
+}
Review comment:
This should be called StateLogEntry, we log state changes not every event.
##########
File path: pkg/scheduler/objects/application.go
##########
@@ -142,6 +149,20 @@ func (sa *Application) SetState(state string) {
sa.stateMachine.SetState(state)
}
+func (sa *Application) recordEvent(time time.Time, appState string, prevState string) {
Review comment:
signature cleanup:
* time is always passed in as time.Now(), we can set it here. The nano second differences are not important.
* prevState is not used as the ordering provides the previous state already
##########
File path: pkg/scheduler/objects/application.go
##########
@@ -80,6 +85,7 @@ type Application struct {
gangSchedulingStyle string // gang scheduling style can be hard (after timeout we fail the application), or soft (after timeeout we schedule it as a normal application)
finishedTime time.Time // the time of finishing this application. the default value is zero time
rejectedMessage string // If the application is rejected, save the rejected message
+ eventLog []*EventLogEntry // event log for this application
Review comment:
This should be called stateLog
##########
File path: pkg/scheduler/objects/application.go
##########
@@ -281,6 +303,9 @@ func (sa *Application) timeoutStateTimer(expectedState string, event application
sa.notifyRMAllocationReleased(sa.rmID, toRelease, si.TerminationType_TIMEOUT, "releasing placeholders on app complete")
sa.clearStateTimer()
} else {
+ // HandleApplicationEvent assumes the lock to be held
+ sa.Lock()
+ defer sa.Unlock()
Review comment:
We have two choices:
1. move adding this lock and a lock review of `timeoutStateTimer()` to a new jira., or
2. fix all locking issues here: `getPlaceholderAllocations()` accesses the allocations map unlocked which might cause issues. `clearStateTimer()` in all cases but here is called under lock.
We discussed the `clearStateTimer()` call yesterday and I am not sure it causes a problem but we might as well be careful.
--
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] [yunikorn-core] craigcondit commented on pull request #397: [YUNIKORN-1163] Return history of application state transitions in REST API
Posted by GitBox <gi...@apache.org>.
craigcondit commented on pull request #397:
URL: https://github.com/apache/yunikorn-core/pull/397#issuecomment-1082392078
@wilfred-s I know you had some ideas surrounding this as well. Is this what you had in mind?
--
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