Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some minor cleanup and optmization #57

Merged
merged 1 commit into from
Apr 2, 2019
Merged

some minor cleanup and optmization #57

merged 1 commit into from
Apr 2, 2019

Conversation

hzxuzhonghu
Copy link
Collaborator

  1. remove some unnecessary fields in controller

  2. reduce the depend on wait.until to call handler func for each item, which requires more cost.

@k82cn
Copy link
Member

k82cn commented Apr 2, 2019

LGTM overall, let's get it merged when CI is happy :)

@hzxuzhonghu
Copy link
Collaborator Author

Sorry, forget to set gofmt

func (jc *jobCache) processCleanupJob() {
func (jc *jobCache) worker() {
for jc.processCleanupJob() {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the empty line

"github.com/golang/glog"
"sync"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move sync close to fmt.

@k82cn
Copy link
Member

k82cn commented Apr 2, 2019

merge the three commits into one.

@hzxuzhonghu
Copy link
Collaborator Author

done

@k82cn k82cn merged commit be49d98 into master Apr 2, 2019
@k82cn k82cn deleted the controller branch April 2, 2019 11:24
wangyuqing4 pushed a commit to wangyuqing4/volcano-1 that referenced this pull request Apr 30, 2019
【Issue volcano-sh#57】【BUG2019040101375 】【BUG2019032102153 】增加policy中action和events的校验,去掉RestartTask action

单号:  BUG2019040101375; BUG2019032102153 

特性/模块名称: volcano-admission

修改原因:
1. policy中RestartTask action配置后不生效
2. policy中action和event缺少校验

修改内容:
1. RestartTask未被state实现,去掉这个action
2. 增加policy中可配置action和event的校验,action的可取值为"AbortJob","RestartJob","TerminateJob","CompleteJob","ResumeJob"
    events的可取值为"*","PodFailed","PodEvicted","Unknown",“TaskCompleted”

自验情况 自验通过
验证yaml [policy.yaml](/uploads/2d684ceab9b5a399571c4aff233e790b/policy.yaml)
验证结果
![image](/uploads/13973e45fd75d45b611791fd039488be/image.png)

![image](/uploads/d0b9cb5e7a501dc87d53f78a4ac29477/image.png)




Issues info:
Issue ID: 57
Title: 【BUG2019040101375 】restartTask不生效【BUG2019032102153 】envents/action组合不合理
Issue url: CBU-PaaS/Community/volcano/volcano#57


See merge request CBU-PaaS/Community/volcano/volcano!92
kevin-wangzefeng pushed a commit to kevin-wangzefeng/volcano that referenced this pull request Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants