https://pulumi.com logo
Title
r

refined-pilot-45584

04/24/2023, 1:34 PM
Anyone ever used a fresh Pulumi Install for Go Applications and received this error? I can only assume it is to with with my environment as the actual Pulumi code works on a different machine.
l

limited-rainbow-51650

04/24/2023, 1:42 PM
Hey @refined-pilot-45584, do you also have the
go
binary somewhere in your
PATH
for Pulumi to find it?
r

refined-pilot-45584

04/24/2023, 1:50 PM
100% on the money; Was weird as my SSH session and VSCode Server sessions had different configurations. Resolved now but your suggestion was exactly the fix. It wasn’t looking at the right Paths.
@limited-rainbow-51650 any ideas on this one though? This was the initial error that got us to set up a new environment in the first place. It’s weird cause it has never happened and then all of a sudden… Bang just started popping up…
l

limited-rainbow-51650

04/24/2023, 2:03 PM
Does the file
/tmp/pulumi-go.4092750539
exist? Is it an executable?
@refined-pilot-45584 can you check how
/tmp
is mounted? You might bump into this: https://github.com/pulumi/pulumi/issues/11687
r

refined-pilot-45584

04/24/2023, 3:52 PM
@limited-rainbow-51650 Yeah I had seen this post. It’s interesting I have tried both the build configuration options and also remounting my /tmp folder but to no avail. That said I have also noticed something weird the mentioned .go executable file never actually appears in the /tmp folder or in the build config folder if I add one. Further more Pulumi up / Pulumi New don’t seem to be making my .Pulumi folder anymore…
e

echoing-dinner-19531

04/25/2023, 8:19 AM
Have you tired setting "buildTarget" to a path inside the project folder (like "./projexe")?
r

refined-pilot-45584

04/25/2023, 8:37 AM
Hey @echoing-dinner-19531 I have; Two things on this. I would hope to avoid having to hard code it in this way. However when I add the build it still doesn’t work. Secondly another strange thing is I get the error: “Sorry, could not create stack ‘dev’: stack ‘dev’ already exists” but specifically when running Pulumi new in a en empty folder. One thing I have noticed that might be “problematic” whats the max supported version of GO for Pulumi?
e

echoing-dinner-19531

04/25/2023, 8:41 AM
Secondly another strange thing is I get the error: “Sorry, could not create stack ‘dev’: stack ‘dev’ already exists” but specifically when running Pulumi new in a en empty folder.
That might be an odd error message based on the project already existing. What does
pulumi stack ls ---all
show?
whats the max supported version of GO for Pulumi?
We test with 1.19 and 1.20, and our support policy is for any version currently "in support" from upstream (i.e https://go.dev/doc/devel/release#policy)
r

refined-pilot-45584

04/25/2023, 9:13 AM
pulumi stack ls ---all
shows all the stacks. However I am not 100% sure where they are located, some of them appear in app.pulumi.com and some do not. So I think at different times pulumi login has been set to local. . I am also checking a few things about the GO version now. I am not sure if It’s Go related but I am using v1.21 I will try with a different version probably 1.19 to see if it’s that.
e

echoing-dinner-19531

04/25/2023, 9:15 AM
ls --all
should only show from one place, it can't query the service and the local backend at the same time. We haven't tested 1.21 yet so that could be an issue, if you find out what's wrong with it we can probably fix it up given we're gonna be supporting 1.21 once it's officially released anyway.
r

refined-pilot-45584

04/25/2023, 12:31 PM
@echoing-dinner-19531 could you think of any reason why the
pulumi up
command would get a permission denied error given that the file configured in the runtime args is being created by the same
pulumi up
command:
runtime:
  name: go
  options:
    buildTarget: ./build/project
I can see the file the file being created; But the permission denied error is very strange given as such.
error: an unhandled error occurred: command errored unexpectedly: fork/exec ./build/project: permission denied
e

echoing-dinner-19531

04/25/2023, 2:01 PM
Maybe execute bit permissions, I'm not sure we're explicit about setting that.
ls -l ./build/project
and see what that says. You could also try running with verbose logs (
-v10 --logflow --logtostderr
) to see if that logs out any more information about what's going on.
r

refined-pilot-45584

04/25/2023, 3:06 PM
Yeah Okay I am going to try the verbose logging. Additionally. Small question. When someone runs
pulumi new gcp-go
what causes the creation of the
.pulumi
folder. I can’t see a
buildTarget
inside the template YAML files.
e

echoing-dinner-19531

04/25/2023, 4:32 PM
Are you logged in to the local filesystem `pulumi login file://`<file://I|?> That'll be stack state ".pulumi" folder.
c

clean-zoo-67541

05/09/2023, 3:33 PM
Did you ever end up solving the issue? @refined-pilot-45584 I'm experiencing a similar error
r

refined-pilot-45584

05/15/2023, 12:24 PM
Hey @clean-zoo-67541 yes; Actually I did. It was a combination of multiple things. Firstly. I was building out a template; Which was the plan. But the template was consuming a module. Both the Module and the Template had main functions. I was trying to repurpose the main.go file for both the module and the template functions and this didn’t work so i separated them out. Module (no main function). Template (main function) in main.go Then when I run the pulumi new cli command the template is built but it doesn’t try to build the module but rather consumes it.
c

clean-zoo-67541

05/15/2023, 12:36 PM
Thank you so much for the detailed response! that's perfect
r

refined-pilot-45584

05/15/2023, 12:37 PM
Sorry it took so long. Let me know if this resolves the problem for you.