-
Notifications
You must be signed in to change notification settings - Fork 31
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
named groups #392
named groups #392
Conversation
Will |
8ab0c31
to
9d8533a
Compare
Yeah, I suppose it would (doesn't look like we have any fields call just "group" right now though). Should we rename it back to "lock"? something else? |
9d8533a
to
1abd779
Compare
Two nodes that share a group and also have an explicit dependency seems to cause a deadlock. Example: task.query "a" {
query = "echo a"
group = "query"
depends = ["task.query.b"]
}
task.query "b" {
query = "echo b"
group = "query"
} |
1abd779
to
1fccc09
Compare
return len(b.g.Dependencies(b.nodes[i].ID)) > len(b.g.Dependencies(b.nodes[j].ID)) | ||
} | ||
|
||
func groupDeps(ctx context.Context, g *graph.Graph, group string) (*graph.Graph, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any way that we can reasonably break this up to factor out smaller helper functions? Like maybe pulling some of the individual for loops out into helper functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I broke out each stage into separate functions.
LGTM! |
thx! |
fixes #249
replaces #379