-
Notifications
You must be signed in to change notification settings - Fork 566
Add App Insights data plane query SDK #3294
Conversation
Can one of the admins verify this patch? |
ms-rest-nodeauth is the intended way to do ADAL authentication with the new TS SDKs. It sounds like weird type checking issues are happening around the identity of the types referenced in each definition of ServiceClientCredentials in the conflicting versions of ms-rest-js. I've published |
@RikkiGibson The types are still slightly mismatched. Fiddled around a bit, I think the mismatch is from ms-rest-azure-js. Here are the versions of ms-rest-js I see the packages pulling in: ms-rest-azure-js@0.8.82 => ms-rest-js@0.12.293 Could you bump ms-rest-azure-js to the same version you did for ms-rest-nodeauth? I also tried using the older ms-rest-nodeauth versions but couldn't find a proper match. |
Does it still fail with everything installed at the |
Regenerated with I can make calls, but I'm still hitting 403s because of the token resource issue. Is there a way I can add and use a custom token resource? |
It sounds like some recent improvements were made in ms-rest-azure and not ported over to ms-rest-nodeauth. We'll do some work to move those improvements over. |
@RikkiGibson Are the versions between the dependent libraries + code generator stable enough to move forward here? I tried maybe ~a week ago and had some similar typing issues, just want to be ready to go ahead with this when things are smoothed out. |
@alexeldeib It looks like it will probably take another week for ms-rest-nodeauth to stabilize. Once we start publishing preview ARM SDKs in https://github.com/Azure/azure-sdk-for-js, I would say we are stable enough to depend on. |
@daschult Is this defunct/should I close it out? I saw you generated and merged the query code and published the package? If so, thank you! 😄 |
@daschult @kpajdzik Could you also clarify the difference between these two folders?
Former seems to be the source of the npm package. Just wondering what the @Azure folder is intended for and why it follows the |
@alexeldeib @Azure folder reflects new name convention for all the Azure packages published on NPM ( |
Thanks for the clarification! I'll go ahead and close this PR, and take a stab at testing out the published SDK when I have a chance. |
After some additional offline discussion, I'm closing #3021 and opening this PR to add support for App Insights data plane querying using the typescript generator. There wasn't an obvious pattern here, so I mirrored what I saw from https://github.com/amarzavery/azure-batch-ts as much as I could.
Couple questions came up. I tried out the library and ran into Azure/ms-rest-js#156. I browsed ms-rest-nodeauth and ms-rest-js and decided to try doing the auth with loginWithServicePrincipal, but looks like the types from the auth library and the service client aren't compatible? I'm curious what the intended story is around auth.
I'm also trying to use a custom resource and from the code it looks that that will not be possible using ms-rest-nodeauth with service principal; It currently looks like my available option is using adal-node to acquire tokens and create TokenCredentials? I figure this and the above will probably go hand in hand.
I'll also clarify examples, readme, etc.
Thanks!