Skip to content
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

Delete resource bugfix #275

Merged
merged 6 commits into from
Jun 8, 2018
Merged

Delete resource bugfix #275

merged 6 commits into from
Jun 8, 2018

Conversation

NoChance777
Copy link
Contributor

When trying to delete resource with ...delete() it causes exception "Cannot read property 'qs' of undefined".

Copy link
Contributor

@silasbw silasbw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this. Have you tried using the newer API documented in the README.md? I don't think it has this issue.

@@ -91,6 +91,8 @@ class BaseObject extends CallableObject {
options = {};
} else if (typeof options === 'string') {
options = { name: options };
} else if (typeof options === 'undefined') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are you calling delete? Are you also leaving cb undefined? If so, won't this.api.delete fail when it invokes the cb?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! I've been using this lib since version 3 and only update version, but not a code.
Here is example of using

const api = new Api.Api(k8sConfig); //get config from file
this.api = api.group(apiVersion);  //use batch/v1 for jobs
...
await this.api.ns(defaultNS).jobs(jobName).delete();      

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passing empty object into delete method works well, but it isn't documented

@silasbw
Copy link
Contributor

silasbw commented Jun 7, 2018

Ok, sounds good. Can you remove your changes to package-lock.json? I think this is good to go after that.

This reverts commit e1c204c.
@NoChance777
Copy link
Contributor Author

NoChance777 commented Jun 8, 2018

done.

@silasbw silasbw merged commit 36ca19f into godaddy:master Jun 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants