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

feat(webhook): add task dependson webhook #1920

Merged
merged 1 commit into from Dec 24, 2021

Conversation

shinytang6
Copy link
Member

@shinytang6 shinytang6 commented Dec 24, 2021

Signed-off-by: shinytang6 1074461480@qq.com

prior pr: #1833

Signed-off-by: shinytang6 <1074461480@qq.com>
@volcano-sh-bot volcano-sh-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 24, 2021
@Thor-wl Thor-wl requested review from william-wang, huone1, Thor-wl and hwdef and removed request for merryzhou, hzxuzhonghu and yuanchen8911 December 24, 2021 03:19
Copy link
Member

@hwdef hwdef left a comment

Choose a reason for hiding this comment

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

Do you need to check if the task name in task.depedensOn is in the job?

By the way, Very well written about dag. tql.

@shinytang6
Copy link
Member Author

Do you need to check if the task name in task.depedensOn is in the job?

By the way, Very well written about dag. tql.

I think it is not necessary. If there is an illegal taskName defined in dependsOn, it will not form a dag and rejected by webhook.

@hwdef
Copy link
Member

hwdef commented Dec 24, 2021

/lgtm
Thanks!

@volcano-sh-bot volcano-sh-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 24, 2021

// topoSort uses topo sort to sort job tasks based on dependsOn field
// it will return an array contains all sorted task names and a bool which indicates whether it's a valid dag
func topoSort(job *batchv1alpha1.Job) ([]string, bool) {
Copy link
Member

@Thor-wl Thor-wl Dec 24, 2021

Choose a reason for hiding this comment

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

Nice work for topoSort and makeGraph functions!
@renhuanyu These can be helpful for hierarchical queue check, too. Please pay attentions.

@Thor-wl
Copy link
Member

Thor-wl commented Dec 24, 2021

/approve

@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Thor-wl

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 24, 2021
@volcano-sh-bot volcano-sh-bot merged commit 32ae0dc into volcano-sh:master Dec 24, 2021
@shinytang6 shinytang6 deleted the feat/task-dag-webhook branch December 24, 2021 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants