Closed SteffenBoThomsen closed 1 year ago
Hi. Thanks for filing this. I am having difficulty reproducing this with the information given. I have a few questions
@pulumi/aws
back to the previous version fix the issue?pulumi about
?The common denominator between the stacks that print the warning are, they all use custom resource components.
This seems interesting. I'm trying to drill down on this. Can you elaborate more on what custom resource components
you're using? For example, we have ComponentResource
and CustomResource
.
Thanks!
Hi,
In terms of a workaround, does downgrading @pulumi/aws back to the previous version fix the issue?
After downgrading I still get the error, but here it seems valid enough, as the stacks resources are set to use the provider 5.27.0 and it now actually is back at using 5.9.2.
Can you post the output of pulumi about?
Sure, though there's no options to tell pulumi where to look for the yarn.lock
file, in a monorepo where we utilize NX - the stacks do not reside together with the lock file.
What package manager do you use with your monorepo?
Yarn
This seems interesting. I'm trying to drill down on this. Can you elaborate more on what custom resource components you're using? For example, we have ComponentResource and CustomResource.
We are using CustomResource
components, but this morning, the observation was disproved. The only other thing I can think of, is that the stacks that give the warning, have been previewed (directly after upgrade) using the Automation API. Whereas the stacks that have been previewed with the cli did not have the message. I'm not 100% that this is true throughout - but it's the only link I can think of.
EDIT: Just ran a test on whether the automation-api could be the culprit, and it doesn't seem like it as I get the warning on a completely new stack both with previews through cli only and through the auomation-api.
Ah! This took longer than I'd like to admit to see, but
ulumi-resource-aws.exe] wrote a non-numeric port to stdout ('0'): strconv.Atoi: parsing "Cannot find file at ..\\\\lib\\pulumi\\home\\plugins\\resource-aws-v5.9.2\\pulu
mi-resource-aws.exe' This usually indicates a missing or moved file.\r": invalid syntax
That error message gives a big hint to what I think has gone wrong. You've got an executable called "pulumi-resource-aws.exe" on your PATH (or Path, because Windows). Pulumi always prefers to use executables on PATH over those in the plugin directory (this should probably be changed, but lord knows how many people now depend on this behavior).
I'm not sure how you've ended up with a resource provider in C:\Program Files\chocolatey\bin but I'd suggest you delete it, then try again.
I'm not sure how you've ended up with a resource provider in C:\Program Files\chocolatey\bin but I'd suggest you delete it, then try again.
Removing them also removes the warning, so that's perfect.
The following list is the resource providers present in the bin path:
Azure Native is a quite recent addition, as it's only a couple of days ago i created the first azure project. I used pulumi new azure-typescript
- i think the solution might be to ignore resource provider executables in the chocolatey package installation:
https://docs.chocolatey.org/en-us/create/functions/install-binfile
Chocolatey automatically shims executables in package folders that are not explicitly ignored, putting them into the bin folder (and subsequently onto the PATH).
i think the solution might be to ignore resource provider executables in the chocolatey package installation:
They already should be. Provider executable aren't even fetched via chocolatey. I wonder if you've got an unusual PULUMI_HOME environment variable set that is causing these to get installed to chocolateys folder rather than the user home folder?
They already should be. Provider executable aren't even fetched via chocolatey. I wonder if you've got an unusual PULUMI_HOME environment variable set that is causing these to get installed to chocolateys folder rather than the user home folder?
Spot on.
I wonder if you've got an unusual PULUMI_HOME environment variable set that is causing these to get installed to chocolateys folder rather than the user home folder?
To expand on this part. I was indeed the case. Due to tight execution policy on corporate machines, it could not be located in the default location. So when initially setting up Pulumi it was changed. For ease of file structure I placed it together with the actual installation.
This resulted in the above problem. As chocolatey would indeed take all executables in the chocolatey
tree and put them into the bin folder if they where not ignored. Probably a very niche case. Only thing I can think of, that might have avoided it in my case, would be a note on the docs around PULUMI_HOME
.
Thank you so much for confirming!
Only thing I can think of, that might have avoided it in my case, would be a note on the docs around PULUMI_HOME.
I've raised https://github.com/pulumi/pulumi-chocolatey/issues/11 to track that.
What happened?
I've recently upgraded the provider plugin
@pulumi/aws
to a newer version. Now when i do apreview
orup
I get the following warning:When doing a
pulumi plugin ls
I see the following:If I run the following command to remove the 5.9.2 plugin version
pulumi plugin rm resource aws 5.9.2
and then run a preview I get the following error:This indicates that the stack is somehow still using the 5.9.2 Provider. Doing an export of the stack with
pulumi stack export --file out.json
- the stack output has no references to the 5.9.2 version but are instead all listed as using::pulumi:providers:aws::default_5_27_0
.This lets me believe that either:
pulumi up
Let me know if I can provide further information that can help track this error.
Steps to reproduce
I haven't been able to reproduce the setup.
Expected Behavior
I expected to do the update of the provider plugin, and then see that the provider would be updated on resources on the next
pulumi up
without giving me warnings on the provider version.I wouldn't expect the program to give me an error after removing the old plugin version, when the stack is pointing to an available newer version.
Actual Behavior
I get a warning on a provider version no longer in use - and can't remove the old provider plugin as the stack then fails.
Output of
pulumi about
No response
Additional context
An observation, that might be a clue, our setup is a mono-repository where we have multiple stacks. All got the provider updated, but only some of the stack are printing the warning. The common denominator between the stacks that print the warning are, they all use custom resource components.
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).