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

Move InstallDependencies to the language plugin #9294

Merged
merged 16 commits into from Apr 3, 2022

Commits on Mar 25, 2022

  1. 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?
    Frassle committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    06892f8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c7cd867 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d98f8b7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4de3e1a View commit details
    Browse the repository at this point in the history
  5. Add to CHANGELOG

    Frassle committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    b25f999 View commit details
    Browse the repository at this point in the history
  6. lint

    Frassle committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    9e6e620 View commit details
    Browse the repository at this point in the history
  7. format

    Frassle committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    45cc65e View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2022

  1. Configuration menu
    Copy the full SHA
    00e51a3 View commit details
    Browse the repository at this point in the history
  2. Test strings

    Frassle committed Mar 26, 2022
    Configuration menu
    Copy the full SHA
    6fa09ff View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2022

  1. Configuration menu
    Copy the full SHA
    ec18569 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    74e477b View commit details
    Browse the repository at this point in the history
  3. s/Hack/Workaround

    Frassle committed Apr 2, 2022
    Configuration menu
    Copy the full SHA
    e54302c View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2022

  1. Use termios

    Frassle committed Apr 3, 2022
    Configuration menu
    Copy the full SHA
    dfbdb8c View commit details
    Browse the repository at this point in the history
  2. Tweak terminal test

    Frassle committed Apr 3, 2022
    Configuration menu
    Copy the full SHA
    bf29a3c View commit details
    Browse the repository at this point in the history
  3. lint

    Frassle committed Apr 3, 2022
    Configuration menu
    Copy the full SHA
    75ad940 View commit details
    Browse the repository at this point in the history
  4. Fix windows build

    Frassle committed Apr 3, 2022
    Configuration menu
    Copy the full SHA
    86aa170 View commit details
    Browse the repository at this point in the history