New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automation API nodejs #5347
Automation API nodejs #5347
Conversation
aaced4f
to
5726236
Compare
2410de4
to
0cef250
Compare
@pgavlin @justinvp I could use an initial set of eyes on this for an API review. I'd like feedback on the surface area, and any suggestions to make it more idiomatic. Could you take a look at and drop some notes on the following:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to see this coming together! Here's some initial feedback.
I am still mulling on the overall design. I'm going to spend a little more time noodling and thinking about it and will let you know if I have any other concrete suggestions. Will try to get that to you ASAP.
27efe13
to
643d271
Compare
738fc30
to
2a9beee
Compare
2a9beee
to
71f0943
Compare
@justinvp please take another look. I believe things are in a shippable state at this point. I will definitely be continuing to iterate and land new features over the next week or two, but I believe this hits all of the broad strokes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still looking this over (will continue looking later this evening), in the meantime, here are some initial comments.
ea9c2c6
to
8776525
Compare
@justinvp thanks for taking a look! I've updated everything accordingly. Let me know if you think we need any additional changes to get this landed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more comments, but otherwise LGTM for getting this initial version landed.
* | ||
* @param opts Options used to configure the Workspace | ||
*/ | ||
public static async create(opts: LocalWorkspaceOptions): Promise<LocalWorkspace> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one thing I keep wondering about is whether we can make it more intuitive/obvious which methods should be used for which scenarios.
Right now it's not immediately obvious when I should use LocalWorkspace.create
vs LocalWorkspace.createStack/createOrSelectStack/selectStack
vs. Stack.create/createOrSelect/select
, without looking at example usage or reading the doc comments. If LocalWorkspace.createStack/createOrSelectStack/selectStack
are the mainline methods to use, wondering if we should rename create
to a name that's a little less enticing. Also when I see LocalWorkspace.create
I wonder whether it's creating the workspace on disk or just opening an existing directory.
I'm fine shipping an initial alpha version of the APIs as they are now, but would like to noodle on this some more to see if we can come up with more intuitive entry points into this API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think that the answer here is documentation.
Happy to revisit this later if we come up with better ideas.
7eae494
to
d8bab4d
Compare
This is the nodejs implementation of the Automation API. This isn't at complete parity with the Go implementation, but is enough of an initial impl to get the work landed. This includes:
Workspace
interface andLocalWorkspace
implStack
pulumi learn
page on pulumi.com).host
mode for nodejs viaserver.ts
).Contributes to #3901