pulumi / pulumi-yaml

YAML language provider for Pulumi
Apache License 2.0
39 stars 12 forks source link

Plugin Install fails silently if environment cannot support the plugin. #412

Open MitchellGerdisch opened 1 year ago

MitchellGerdisch commented 1 year ago

What happened?

I have a pulumi yaml program that uses the pluginDownloadURL option. If the component is written in, say, python, and I run pulumi up for the yaml program in an environment that does not have Python installed, the output appears to download the plugin but doesn't and gives no indication as to why.

Running pulumi plugin install ... will immediately throw an error about not having python installed.

This sort of error should be presented in the pulumi up case.

Steps to reproduce

  1. Create an MLC written in python (probably any language other than go? but not sure)
  2. Store the generated plugin someplace.
  3. Create a YAML program that uses the pluginDownloadURL option for the resource declared using the MLC
  4. Run pulumi up in and environment that does not have, in this case, Python installed.
  5. See it act like it downloaded the plugin.
  6. Do pulumi plugin ls and note that the plugin was not installed.
  7. Run `pulumi plugin install resource xxx v.v.v --server "plugin-download-url"
  8. See the error message indicating that Python is not installed.

Expected Behavior

A better error message should be presented in the pulumi up step instead of just failing and telling me I need to install using pulumi plugin install

Actual Behavior

No useful error message is provided.

Output of pulumi about

No response

Additional context

I saw this with a customer and so do not have a repro at hand. That said, I do have a python-based MLC that I could use to create a repro if that will help.

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Frassle commented 1 year ago

Is this actually unique to yaml? Do you get the same issue if you use the MLC from node/go/etc?

MitchellGerdisch commented 1 year ago

It may. But in the node/etc cases you need to install the SDK and that by definition means the environment is set up.

Frassle commented 1 year ago

I suspect this isn't a yaml bug per-se, but I'll leave it here for now.