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
Move InstallDependencies to the language plugin #9294
Merged
Merged
Commits on Mar 25, 2022
-
Move InstallDependencies to the language plugin
This changes `pulumi new` and `pulumi up <template>` to invoke the language plugin to install dependencies, rather than having the code to install dependencies hardcoded into the cli itself. This does not change the way policypacks or plugin dependencies are installed. In theory we can make pretty much the same change to just invoke the language plugin, but baby steps we don't need to make that change at the same time as this. We used to feed the result of these install commands (dotnet build, npm install, etc) directly through to the CLI stdout/stderr. To mostly maintain that behaviour the InstallDependencies gRCP method streams back bytes to be written to stdout/stderr, those bytes are either read from pipes or a pty that we run the install commands with. The use of a pty is controlled by the global colorisation option in the cli. An alternative designs was to use the Engine interface to Log the results of install commands. This renders very differently to just writing directly to the standard outputs and I don't think would support control codes so well. The design as is means that `npm install` for example is still able to display a progress bar and colors even though we're running it in a separate process and streaming its output back via gRPC. The only "oddity" I feel that's fallen out of this work is that InstallDependencies for python used to overwrite the virtualenv runtime option. It looks like this was because our templates don't bother setting that. Because InstallDependencies doesn't have the project file, and at any rate will be used for policy pack projects in the future, I've moved that logic into `pulumi new` when it mutates the other project file settings. I think we should at some point cleanup so the templates correctly indicate to use a venv, or maybe change python to assume a virtual env of "venv" if none is given?
Configuration menu - View commit details
-
Copy full SHA for 06892f8 - Browse repository at this point
Copy the full SHA 06892f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for c7cd867 - Browse repository at this point
Copy the full SHA c7cd867View commit details -
Configuration menu - View commit details
-
Copy full SHA for d98f8b7 - Browse repository at this point
Copy the full SHA d98f8b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4de3e1a - Browse repository at this point
Copy the full SHA 4de3e1aView commit details -
Configuration menu - View commit details
-
Copy full SHA for b25f999 - Browse repository at this point
Copy the full SHA b25f999View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e6e620 - Browse repository at this point
Copy the full SHA 9e6e620View commit details -
Configuration menu - View commit details
-
Copy full SHA for 45cc65e - Browse repository at this point
Copy the full SHA 45cc65eView commit details
Commits on Mar 26, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 00e51a3 - Browse repository at this point
Copy the full SHA 00e51a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fa09ff - Browse repository at this point
Copy the full SHA 6fa09ffView commit details
Commits on Apr 2, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ec18569 - Browse repository at this point
Copy the full SHA ec18569View commit details -
Configuration menu - View commit details
-
Copy full SHA for 74e477b - Browse repository at this point
Copy the full SHA 74e477bView commit details -
Configuration menu - View commit details
-
Copy full SHA for e54302c - Browse repository at this point
Copy the full SHA e54302cView commit details
Commits on Apr 3, 2022
-
Configuration menu - View commit details
-
Copy full SHA for dfbdb8c - Browse repository at this point
Copy the full SHA dfbdb8cView commit details -
Configuration menu - View commit details
-
Copy full SHA for bf29a3c - Browse repository at this point
Copy the full SHA bf29a3cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 75ad940 - Browse repository at this point
Copy the full SHA 75ad940View commit details -
Configuration menu - View commit details
-
Copy full SHA for 86aa170 - Browse repository at this point
Copy the full SHA 86aa170View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.