This message was deleted.
s
This message was deleted.
w
This was in my “Changes” tab:
Copy code
Type                           Name                                                       Operation
~   pulumi:pulumi:Stack            <PROJECT-NAME>-<STACK-NAME>                                          refreshed
l
What's your backend? Maybe you're creating a new stack in a state file that already has the same stack in it?
I got that (or something very similar) when I created two StackReferences for the same stack (instead of creating one and passing it to both places).
b
@wet-soccer-72485 what are you deploying? a helm chart?
w
@little-cartoon-10569 I tried only calling
getStack
and
getProject
once in my project because I can’t think of where else I’d be creating StackReferences (maybe some function I am unaware of). I’ll look around for other possible StackReferences..
l
I think StackReferences are always created manually, if you don't think you're doing it, then you're not. Must be something else..
👍 1
w
@billowy-army-68599 Nope, not a helm chart. I am however deploying a set of kubernetes assets and GCP infra
@little-cartoon-10569 got it thanks..
My backend btw is just Pulumi @little-cartoon-10569 to answer your first question.
(Unless I’ve forgotten and I am actually using a GCP bucket or something else… I’ll check)
The underlying issue beyond the URN seems to be this (i did not notice before because I was in the “changes” tab in pulumi cloud):
Copy code
Error: Only one root Pulumi Stack may be active at once
		at Stack.<anonymous> (/home/runner/work/<repo-name>/<repo-name>/node_modules/@pulumi/pulumi/runtime/stack.js:79:23)
		at Generator.next (<anonymous>)
		at fulfilled (/home/runner/work/<repo-name>/<repo-name>/node_modules/@pulumi/pulumi/runtime/stack.js:18:58)
		at processTicksAndRejections (internal/process/task_queues.js:97:5)
error: Running program '/home/runner/work/<repo-name>/<repo-name>' failed with an unhandled exception:
Error: Only one root Pulumi Stack may be active at once
		at Stack.<anonymous> (/home/runner/work/<repo-name>/<repo-name>/node_modules/@pulumi/pulumi/runtime/stack.js:79:23)
		at Generator.next (<anonymous>)
		at fulfilled (/home/runner/work/<repo-name>/<repo-name>/node_modules/@pulumi/pulumi/runtime/stack.js:18:58)
		at processTicksAndRejections (internal/process/task_queues.js:97:5)
error: Running program '/home/runner/work/<repo-name>/<repo-name>' failed with an unhandled exception:
Error: Only one root Pulumi Stack may be active at once
		at Stack.<anonymous> (/home/runner/work/<repo-name>/<repo-name>/node_modules/@pulumi/pulumi/runtime/stack.js:79:23)
		at Generator.next (<anonymous>)
		at fulfilled (/home/runner/work/<repo-name>/<repo-name>/node_modules/@pulumi/pulumi/runtime/stack.js:18:58)
		at processTicksAndRejections (internal/process/task_queues.js:97:5)
l
That's weird. Are you calling
runInPulumiStack()
?
w
…Yes.
l
Ah. That's test code. Shouldn't be calling that in a Pulumi application (afaik).
w
Sounds like maybe I have failed to properly use
runInPulumiStack()
😂 (partial tears for joy if this is it)
l
It can be useful in unit tests sometimes, but I don't think it should be used in projects.
w
Roger that.
Thanks, I’m going to push this up and see if things start working again 🙂
🤞 1
Yup! That was it @little-cartoon-10569. Thank you!
🍾 2
Thank you @billowy-army-68599 for helping as well!
🍾