proud-pizza-80589
06/21/2021, 10:39 PMerror: invalid character '}' after top-level value
errors using the automation api. I console logged a bit and even standalone pulumi -v=5 stack select settlemint/development-ceks01-9afd
gives me the first error. (the stack is new using createOrSelectStack) I found two other threads here on slack where you, @red-match-15116 , debugged it with the users. Any idea what causes this or how i solve it?red-match-15116
06/21/2021, 10:43 PM~/.pulumi/workspaces
due to parallel stack select callsproud-pizza-80589
06/21/2021, 10:44 PMred-match-15116
06/21/2021, 10:56 PMselectStack
because it runs pulumi stack select
, which sets the selected stack as current. Multiple processes simultaneously setting the stack as current can lead to corrupted global state which results in this mangled workspace file.proud-pizza-80589
06/21/2021, 10:58 PMred-match-15116
06/21/2021, 11:00 PM--stack
flag to avoid changing the current
stack - but we overlooked the selectStack
function itself, which is now the one operation that changes global state and therefore cannot be parallelized.proud-pizza-80589
06/21/2021, 11:01 PMred-match-15116
06/21/2021, 11:39 PMhow would one prevent this when doing something like pulumi over http where you have no control over the calls being made?The containing application should have some mechanism to serialize calls to
select
is it on the roadmap for a patch release soon?It is not currently on the roadmap. Depending on what you’re trying to do, it is possible to work around by either serializing the calls to
select
or by running the operation on the workspace itself with the stack specified e.g. LocalWorkspace.stackOutputs([stackName])
proud-pizza-80589
06/22/2021, 6:30 AM