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

.NET: Report plugin install errors during pulumi new #5760

Merged
merged 2 commits into from
Nov 17, 2020

Conversation

justinvp
Copy link
Member

The way pulumi new installs dependencies for .NET projects is slightly different from other languages. For Node.js, Python, and Go, pulumi new runs the appropriate command to install project dependencies (e.g. npm install, pip install, or go mod download). For .NET, it calls the same routine used during preview|up to ensure required plugins are installed. For .NET, this ends up running dotnet build which implicitly installs Nuget packages, builds the project, and also attempts to determine and install the needed Pulumi plugins. When this operation runs during preview|up, and there are failures installing a plugin, the error is logged, but deliberately not returned, because an error will be shown for missing plugins later on during the preview|up operation. However, during pulumi new, we should show any plugin install errors.

Note: Plugin install failure during pulumi new is now much less likely now on Windows with: #5759

Fixes #5685

Copy link
Member

@mikhailshilkov mikhailshilkov left a comment

Choose a reason for hiding this comment

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

LGTM. This would also help find pulumi/pulumi-azure-nextgen#70 sooner.

The way `pulumi new` installs dependencies for .NET projects is slightly different from other languages. For Node.js, Python, and Go, `pulumi new` runs the appropriate command to install project dependencies (e.g. `npm install`, `pip install`, or `go mod download`). For .NET, it calls the same routine used during `preview|up` to ensure required plugins are installed. For .NET, this ends up running `dotnet build` which implicitly installs Nuget packages, builds the project, and also attempts to determine and install the needed Pulumi plugins. When this operation runs during `preview|up`, and there are failures installing a plugin, the error is logged, but deliberately not returned, because an error will be shown for missing plugins later on during the `preview|up` operation. However, during `pulumi new`, we should show any plugin install errors.
@justinvp justinvp merged commit bfe4969 into master Nov 17, 2020
@pulumi-bot pulumi-bot deleted the justin/new_plugininstallerr branch November 17, 2020 05:56
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.

Plugin installation can fail silently during pulumi new on Windows
2 participants