microscopic-postman-4756
08/29/2023, 1:51 AMcurrent_operation.kind
in the output
c. do my stuff
What it looks like with NodeJS automation SDK:
1. List stacks
2. For each stack:
a. Stack.select()
which is mandatory for getting a Stack object. This does the getStack
API call behind the scenes, but discards its output, so the Stack object I get (and the only Stack interface in NodeJS SDK) does not have the current_operation
information.
b. <http://stack.info|stack.info>()
(another API call)
c. check the result of the output of info
d. do my stuff.
It is really annoying that the NodeJS automation API is structured in a way that forces two API calls where the REST API only requires one.
Is there a NodeJS SDK that is a more direct wrapper of the APIs that I could use instead?
Or maybe something else I'm missing?red-match-15116
08/29/2023, 5:50 AMStack.select()
just did pulumi stack select
, which does not result in an API call, it's just a local operation.microscopic-postman-4756
08/29/2023, 3:10 PMred-match-15116
08/29/2023, 5:06 PMpulumi stack select
does not make any API calls, it's been a few years since I worked on this part of Pulumi but it's all local operations as far as I remember it https://github.com/pulumi/pulumi/blob/master/pkg/cmd/pulumi/stack_select.go