tall-scientist-89115
05/03/2021, 11:50 PMpulumi logs -f -s
simultaneously maybe?)
FEATURE=staging PROJECT_NAME=qa npm run create-db-seed destroy
> qa@ create-db-seed /Users/daniel/code/RedJade/infra/scripts
> tsc && node ./bin/scripts/create-db-seed.js "destroy"
project name qa
feature name staging
(node:74675) ExperimentalWarning: Conditional exports is an experimental feature. This feature could change at any time
CommandError: code: 255
stdout:
stderr: error: invalid character 'y' after top-level value
err?:
at Object.createCommandError (/Users/daniel/code/RedJade/infra/scripts/node_modules/@pulumi/pulumi/automation/errors.js:71:17)
at ChildProcess.<anonymous> (/Users/daniel/code/RedJade/infra/scripts/node_modules/@pulumi/pulumi/automation/cmd.js:63:40)
at ChildProcess.emit (events.js:321:20)
at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) {
commandResult: CommandResult {
stdout: '',
stderr: "error: invalid character 'y' after top-level value\n",
code: 255,
err: undefined
},
name: 'CommandError'
}
Same thing happened to me yesterday but I was able to get around it by moving my automation code out of a folder shared with another stack, so was able to hand wave it away -- but then it popped up again today. It was working, working, then not working. Has anyone seen this before?little-cartoon-10569
05/04/2021, 12:03 AMtall-scientist-89115
05/04/2021, 12:11 AMconst appSvcsStack = LocalWorkspace.selectStack({
stackName: `RedJade/qa/app-services`,
workDir: ".",
});
const appSvcsOuts = await (await appSvcsStack).outputs();
billowy-army-68599
05/04/2021, 12:56 AMtall-scientist-89115
05/04/2021, 12:56 AMconst appSvcsStack = LocalWorkspace.selectStack({
stackName: `RedJade/qa/app-services`,
workDir: "../..",
});
edit: this does escape all Pulumi projects though, so maybe it doesn't break..I'll let you guys know.red-match-15116
05/04/2021, 3:56 AMtall-scientist-89115
05/04/2021, 3:58 AMred-match-15116
05/04/2021, 4:00 AMLocalWorkspace.stackOutputs(stackName: string)
method which will enable you to get the stack outputs without selecting each stack. I still would like to get down to the bottom of whats going on here though.tall-scientist-89115
05/04/2021, 4:01 AMred-match-15116
05/04/2021, 4:04 AMI am selecting them concurrentlyI think that might be the issue.
selectStack
modifies global state and might be causing some unexpected behavior.tall-scientist-89115
05/04/2021, 4:04 AMred-match-15116
05/04/2021, 4:05 AMtall-scientist-89115
05/04/2021, 4:05 AMred-match-15116
05/04/2021, 4:12 AMreturn await Promise.all([appSvcsStack, clusterStack, containerStack]).then(
([appSvcsStack, clusterStack, containerStack]) => {
elapsed_time("fetching stacks");
return Promise.all([appSvcsStack.outputs(), clusterStack.outputs(), containerStack.outputs()]).then(
([appSvcsOuts, clusterOuts, containerOuts]) => {
I think if you did the selectStack
step serially:
const appSvcsStack = await LocalWorkspace.selectStack({
stackName: `RedJade/qa/app-services`,
workDir: "..",
});
const clusterStack = await LocalWorkspace.selectStack({
stackName: `RedJade/${projectName}/cluster-configuration`,
workDir: "..",
});
const containerStack = await LocalWorkspace.selectStack({
stackName: `RedJade/global/container-registry`,
workDir: "..",
});
return Promise.all([appSvcsStack.outputs(), clusterStack.outputs(), containerStack.outputs()]).then(
([appSvcsOuts, clusterOuts, containerOuts]) => {
elapsed_time("fetching stack outputs");
return { ... }
and then the rest of your workflow I think you would be okay.tall-scientist-89115
05/04/2021, 4:15 AMred-match-15116
05/04/2021, 4:17 AMhaha yeah, the problem is the die is castAh interesting, once it gets borked theres no recovering it huh?
tall-scientist-89115
05/04/2021, 4:17 AMred-match-15116
05/04/2021, 4:21 AMtall-scientist-89115
05/04/2021, 4:22 AMred-match-15116
05/04/2021, 4:24 AMselectStack
functionality, especially for folks who might want to be doing tasks like getting outputs or destroying multiple stacks who don’t need the global state modifying behavior of selectStack
.renaming the folder did nothing, going to try reinstalling the CLIhonestly not sure if that’s going to help. can you go to that dir (the one workdir points to) and just try using the pulumi CLI to run
pulumi stack ls
?tall-scientist-89115
05/04/2021, 4:28 AMpulumi stack ls
NAME LAST UPDATE RESOURCE COUNT URL
RedJade/app-services 7 hours ago 67 <https://app.pulumi.com/RedJade/qa/app-services>
RedJade/cluster-configuration 1 week ago 29 <https://app.pulumi.com/RedJade/qa/cluster-configuration>
RedJade/cluster-services 6 days ago 58 <https://app.pulumi.com/RedJade/qa/cluster-services>
RedJade/identity 1 week ago 16 <https://app.pulumi.com/RedJade/qa/identity>
RedJade/managed-infra 1 week ago 7 <https://app.pulumi.com/RedJade/qa/managed-infra>
RedJade/staging-apps 1 day ago 0 <https://app.pulumi.com/RedJade/qa/staging-apps>
RedJade/staging-database 52 minutes ago 0 <https://app.pulumi.com/RedJade/qa/staging-database>
staging-database 5 hours ago 0 <https://app.pulumi.com/mypersonalaccount/qa/staging-database>
red-match-15116
05/04/2021, 4:32 AMtall-scientist-89115
05/04/2021, 4:33 AMpulumi stack ls
, JUST pulumi stack
does produce the error (as does pulumi up
)
pulumi stack
error: invalid character 'y' after top-level value
✘(qa-aks4a68d4e2)