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

Apply worker pool to speed up plan-preview's execution #2303

Merged
merged 2 commits into from
Jul 27, 2021

Conversation

nghialv
Copy link
Member

@nghialv nghialv commented Jul 27, 2021

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #2296

Does this PR introduce a user-facing change?:

Apply worker pool to speed up plan-preview's execution

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 31.77%. This pull request decreases coverage by -0.06%.

File Function Base Head Diff
pkg/app/piped/planpreview/builder.go builder.buildApp -- 0.00% +0.00%
pkg/app/piped/planpreview/builder.go builder.build 0.00% 0.00% +0.00%

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 31.77%. This pull request decreases coverage by -0.06%.

File Function Base Head Diff
pkg/app/piped/planpreview/builder.go builder.buildApp -- 0.00% +0.00%
pkg/app/piped/planpreview/builder.go builder.build 0.00% 0.00% +0.00%

@nghialv
Copy link
Member Author

nghialv commented Jul 27, 2021

/changelog

@pipecd-bot
Copy link
Collaborator

CHANGELOG

@nghialv: Changelog has been generated in response to this comment.

Details

Changelog since v0.13.1

Notable Changes

  • Make plan-preview comment more readable in case there are some unchanged applications (#2305)
  • Allow dynamically specify plan-preview command timeout from pipectl (#2299)

Internal Changes

  • Refine error message when the deployment config file was not found (#2302)
  • Fix flaky piped stat builder test (#2307)
  • Add deployment chain into feature status (#2306)
  • Add no-change mark to plan-preview result (#2300)
  • Update controlplane cache monitor board (#2295)
  • Implement Pipeds stat cleaner (#2287)

envName = env.Name
}
// Start some workers to speed up building time.
b.logger.Info(fmt.Sprintf("start %d workers for building plan-preview results for %d applications", numWorkers, numApps))
Copy link
Member

Choose a reason for hiding this comment

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

should we use the above wrapped logger? 👀

Copy link
Member Author

Choose a reason for hiding this comment

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

Right. Nice catch!

@pipecd-bot
Copy link
Collaborator

TODO

The following ISSUES will be created once got merged. If you want me to skip creating the issue, you can use /todo skip command.

Details

1. Calculating planpreview's diff for other application kinds.

https://github.com/pipe-cd/pipe/blob/9d167403458322dfac1f2bb4f1ac5105edf3cd77/pkg/app/piped/planpreview/builder.go#L260-L263

This was created by todo plugin since "TODO:" was found in 9d16740 when #2303 was merged. cc: @nghialv.

@pipecd-bot
Copy link
Collaborator

COVERAGE

Code coverage for golang is 31.77%. This pull request decreases coverage by -0.06%.

File Function Base Head Diff
pkg/app/piped/planpreview/builder.go builder.buildApp -- 0.00% +0.00%
pkg/app/piped/planpreview/builder.go builder.build 0.00% 0.00% +0.00%

@khanhtc1202
Copy link
Member

Nice work
/lgtm

@nakabonne
Copy link
Member

Good improvement
/approve

@pipecd-bot
Copy link
Collaborator

APPROVE

This pull request is APPROVED by nakabonne.

Approvers can cancel the approval by writing /approve cancel in a comment. Any additional commits also will change this pull request to be not-approved.

@pipecd-bot pipecd-bot merged commit a722eb1 into master Jul 27, 2021
@pipecd-bot pipecd-bot deleted the plan-preview-concurrency branch July 27, 2021 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce plan-preview execution time by making a pool to build result concurrently
4 participants