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

Use math.MaxInt32 to signal unbounded parallelism #2123

Merged
merged 1 commit into from
Oct 29, 2018
Merged

Conversation

swgillespie
Copy link
Contributor

Downlevel versions of the Pulumi Node SDK assumed that a parallelism
level of zero implied serial execution, which current CLIs use to signal
unbounded parallelism. This commit works around the downlevel issue by
using math.MaxInt32 to signal unbounded parallelism.

Fixes #2108.

Downlevel versions of the Pulumi Node SDK assumed that a parallelism
level of zero implied serial execution, which current CLIs use to signal
unbounded parallelism. This commit works around the downlevel issue by
using math.MaxInt32 to signal unbounded parallelism.
@@ -133,7 +133,7 @@ func newDestroyCmd() *cobra.Command {
"Display operation as a rich diff showing the overall change")
cmd.PersistentFlags().IntVarP(
&parallel, "parallel", "p", defaultParallel,
"Allow P resource operations to run in parallel at once (1 for no parallelism, 0 for unbounded parallelism)")
"Allow P resource operations to run in parallel at once (1 for no parallelism). Defaults to unbounded.")
Copy link
Member

Choose a reason for hiding this comment

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

Can we keep the command-line option's behavior the same and just tweak this internally?

Copy link
Contributor

@ellismg ellismg left a comment

Choose a reason for hiding this comment

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

LGTM. One small nit might be to export the math.MaxInt32 valye from the deploy package and have the CLI consume that directly, instead of just having both sides know MaxInt32 is the "unbounded parallelism" number.

@ellismg ellismg merged commit ca540cc into master Oct 29, 2018
@pulumi-bot pulumi-bot deleted the swgillespie/2108 branch October 29, 2018 19:27
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.

None yet

3 participants