-
Notifications
You must be signed in to change notification settings - Fork 8
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
fix: parallelize deployments #1042
Conversation
buildengine/engine.go
Outdated
wg, ctx := errgroup.WithContext(ctx) | ||
wg.SetLimit(runtime.NumCPU()) |
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 tried to follow the pattern in the build
command to limit the concurrency. Not 100% sure if this is the best solution of if there's something else I should try here.
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.
You probably don't need the same limit for deploys, it will be mostly network bound I think. You can probably remove the limit for now.
buildengine/engine.go
Outdated
wg, ctx := errgroup.WithContext(ctx) | ||
wg.SetLimit(runtime.NumCPU()) |
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.
You probably don't need the same limit for deploys, it will be mostly network bound I think. You can probably remove the limit for now.
buildengine/engine.go
Outdated
|
||
for i := 0; i < len(modules); i++ { | ||
wg.Go(func() error { | ||
for module := range deployQueue { |
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.
This should be a for loop with a select inside, that checks <-ctx.Done()
as the other Go call does.
723b6ba
to
2a577ad
Compare
2a577ad
to
a2d1400
Compare
Fixes #1031
Introduces non-blocking deploys so that they can while other modules are build.
BEFORE (20s cold, 11s warm):
AFTER (16s cold, 8s warm):