-
Notifications
You must be signed in to change notification settings - Fork 113
feat: add binding for instance group manager #104
Conversation
Thanks! I think the linter recently switch the format. Can you update the linter and rerun? |
Codecov Report
@@ Coverage Diff @@
## master #104 +/- ##
======================================
Coverage 100% 100%
======================================
Files 19 21 +2
Lines 1581 1749 +168
======================================
+ Hits 1581 1749 +168
Continue to review full report at Codecov.
|
lint tests fixed :-) |
I've added bindings for I will try to have a look at it as well. Is it customary for these APIs to pass an instance of |
Okay, |
Ok, lookin at how images are created I did the same for instance group managers, adding mandatory |
encode and test as function parameters. This reverts commit 6957c62.
Ok, it would appear that at least the create functions are working, thus I think this PR is ready for review! |
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.
All is looking very good, just some small comments so far. Thank you for your help and patience!
src/index.js
Outdated
@@ -351,7 +353,8 @@ Compute.prototype.createHealthCheck = function(name, options, callback) { | |||
* //- | |||
* compute.createImage('new-image', disk).then(function(data) { | |||
* var operation = data[0]; | |||
* var apiResponse = data[1]; | |||
* var image = data[1]; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/index.js
Outdated
* const apiResponse = data[2]; | ||
* }); | ||
*/ | ||
Compute.prototype.createInstanceTemplate = function(name, options, callback) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/index.js
Outdated
* | ||
* @param {string} name - The name of the target image. | ||
* @param {object=} options - See an | ||
* [InstanceTemplate resource](https://cloud.google.com/compute/docs/reference/v1/instanceTemplate#resource). |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/index.js
Outdated
var self = this; | ||
|
||
if (typeof options !== 'object') { | ||
throw new Error('options object is required.'); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/index.js
Outdated
* Get a list of instance templates. | ||
* | ||
* @see [InstanceTemplates Overview]{@link https://cloud.google.com/compute/docs/instanceTemplates} | ||
* @see [InstanceTemplates: list API Documentation]{@link https://cloud.google.com/compute/docs/reference/v1/instanceTemplates} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/zone.js
Outdated
throw new Error('An InstanceTemplate object is required.'); | ||
} | ||
|
||
if (typeof targetSize !== 'number') { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/instance-group-manager.js
Outdated
@@ -0,0 +1,550 @@ | |||
/*! | |||
* Copyright 2016 Google Inc. All Rights Reserved. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/instance-group-manager.js
Outdated
/** | ||
* Get a list of managed VM instances in this instance group manager. | ||
* | ||
* @see [InstaceGroups: listInstances API Documentation]{@link https://cloud.google.com/compute/docs/reference/v1/instanceGroupManagers/listInstances} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/instance-group-manager.js
Outdated
* const apiResponse = data[1]; | ||
* }); | ||
*/ | ||
InstanceGroupManager.prototype.recreateVMs = function(callback) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
src/instance-group-manager.js
Outdated
this.request( | ||
{ | ||
method: 'POST', | ||
uri: '/resize?size=' + parseInt(size), |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Ok, all review remarks should have been fixed now. Thanks for looking at it! |
Ok, sorry it took me so long to fix those last remarks. Should be all good now! |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
I added a commit to do a few things:
⌚️ Status! I'm stuck a bit, as other tasks are pushing their way in front of this one. We still need:
I hope to get back to this soon, but if you want to play around and take on any of these, feel free! Thanks again for your help and patience |
Hi folks, I just merged the master branch and adapted to the updated syntax as much as I could. It looks like coverage tests aren't passing anymore. I'd like to say that this process has been a tad bit frustrating. My original PR had, I believe, a lot of merit on its own to begin with. While I appreciate the reviews and being guided through the various layers of code quality tools here, I am not part of the dev team or working for this project, just a user who wishes to contribute back. The more this PR drags, the more difficult it will be to keep it up-to date. Updating the syntax without merging it was, in a way, pretty inconsiderate if you think about it. I'd love to see this PR merged but, as it stands, I don't think that I am willing to contribute to it past this point. It would be great to see this binding cover some much needed part of the upstream API, however. Cheers, |
Hey Romain, I'm frustrated for you as well. Thanks again for all the help you've provided. It's mostly a matter of attention being spread across all of our projects, and I'm sorry I couldn't spend more on this. When I was able to, seeing the small details that you nailed (docs links, types, test grouping) was very appreciated. For now, this will probably have to sit for a bit longer, due to that same attention issue :( I hope I can come back soon, but for now, my list of "To Dos" above have to be conquered before it's shippable. As always, thank you very much for your help, and I hope this won't deter you from contributing again if you see a mistake or just have an idea. |
@toots and @stephenplusplus, this PR is really out of date. Is this PR salvageable? |
Well, in a more general context, I believe that it'd be nice if the library could cover all of the API functionalities. We use these calls on one of our work project and the fact that they aren't yet part of the released/official code has forced us to work out of a patched version and prevented a full open source release of it. I'd be willing to work on salvaging this one PR but only if there's a clear path for a merge. |
@toots I really apologize for this one - totally my fault. We do try to be a lot more attentive to PRs, but this one is honestly just bad luck. I believe this is the only repository we have that isn't green right now, and it's been broken on master for a number of months. I'm spending some time over the next few weeks trying to get us green, and get us back into a state where the library is shippable. Once we're in that state - I would be happy to re-engage, and see if we can get this landed. Until then - I want to be respectful of your time. If you're blocked - another option here is the apiary library: The apiary library is autogenerated, so the API coverage is going to be 100%. It's going to be far less polished and easy to use, but it will be complete. Apologies again, and thanks for sticking with us here :) |
Sounds good thanks for getting back to me. I'll wait and look at the apiary library meanwhile. |
Ok! So we're in a better place now :) |
@toots, this PR has gone stale. Is it worth reviving it? |
I would love to finish it but I'm swamped at the moment. Do you guys need it finished by a certain deadline? |
Not at all :) Any help you can offer is awesome, whenever you have time (or its cool even if you don't). We really appreciate the help! |
I'm willing to take this over so the maintainer can land it. Any objections? |
Rather than do extensive surgery here, I created #263. It only adds basic support, but I think it will be easier to add features once the basic plumbing is landed. |
This was covered in #263 🥂 |
Fixes #103
This is missing a couple of methods and untested but should be a good start to see if that's headed to the right direction.