pulumi / pulumi-aws-apigateway

Apache License 2.0
10 stars 5 forks source link

Unable to run the plugin in WSL v1 #73

Closed pierskarsenbarg closed 8 months ago

pierskarsenbarg commented 1 year ago

What happened?

Failing with this error:

pulumi:providers:aws-apigateway (default_1_0_1)
    error: failed to load plugin /home/**/.pulumi/plugins/resource-aws-apigateway-v1.0.1/pulumi-resource-aws-apigateway: fork/exec /home/**/.pulumi/plugins/resource-aws-apigateway-v1.0.1/pulumi-resource-aws-apigateway: exec format error

when running the provider binary (so ./pulumi-resource-aws-apigateway) user gets this response:

image

file ./pulumi-resource-aws-apigateway gives the following response:

image

Expected Behavior

pulumi up works and is able to find the provider.

Steps to reproduce

Can't reproduce at the moment.

Output of pulumi about

pulumi about                                                                                                                                          CLI
Version      3.65.1
Go Version   go1.20.3
Go Compiler  gc
Plugins
NAME            VERSION
aws             5.40.0
aws-apigateway  1.0.1
awsx            1.0.2
docker          3.6.1
nodejs          unknown
Host
OS       ubuntu
Version  20.04
Arch     x86_64
This project is written in nodejs:
executable='/home/***/.nvm/versions/node/v18.16.0/bin/node' version='v18.16.0'
Current Stack: ***/my-serverless-app/dev
Found no resources associated with ***/dev
Found no pending operations associated with ***/dev
Backend
Name           [pulumi.com](http://pulumi.com/)
URL            https://app.pulumi.com/***
User           smriti
Organizations  smriti, ***
Dependencies:                                                                                                                                                                                 NAME                    VERSION
@pulumi/aws             5.40.0
@pulumi/awsx            1.0.2
@pulumi/pulumi          3.67.0
@types/node             16.18.29
typescript              4.9.5
@pulumi/aws-apigateway  1.0.1
Pulumi locates its logs in /tmp by default

Additional context

No response

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

Note that this isn't an "all wsl" issue because it runs fine on my wsl setup:

fraser@IBASA-PC:~/projects$ ~/.pulumi/plugins/resource-aws-apigateway-v1.0.1/pulumi-resource-aws-apigateway
36085
^C
fraser@IBASA-PC:~/projects$ file ~/.pulumi/plugins/resource-aws-apigateway-v1.0.1/pulumi-resource-aws-apigateway
/home/fraser/.pulumi/plugins/resource-aws-apigateway-v1.0.1/pulumi-resource-aws-apigateway: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped
fraser@IBASA-PC:~/projects$ uname -a
Linux IBASA-PC 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
justinvp commented 1 year ago

Side note from Slack thread: The aws plugin does work for the user. Could this be a vercel bug for aws-apigateway?

pierskarsenbarg commented 1 year ago

I asked the user to do two things:

  1. Download resource from GitHub and run that: image

  2. Follow these steps:

    • rm ~/my-serverless-app
    • pulumi plugin rm resource aws-apigateway
    • mkdir ~/my-serverless-app
    • cd ~/my-serverless-app
    • pulumi new serverless-aws-typescript
    • pulumi preview

Didn't fix the issue

pierskarsenbarg commented 1 year ago

Also, user is using WSLv1 s we've advised to update to v2

kpitzen commented 1 year ago

There are quite a few known issues with WSL v1 - exec formats being very high on the list of common issues. We can certainly look into this, but WSL v2 is the current supported version.

pierskarsenbarg commented 8 months ago

Just so this is public, the customer updated to WSL v2 and it worked. Not sure if this ticket should be closed or not with that knowledge?

pierskarsenbarg commented 8 months ago

Closing as the guidelines should be "update to v2 of WSL"