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

deprecation: package needs updating #14

Closed
squillace opened this issue Dec 11, 2019 · 5 comments
Closed

deprecation: package needs updating #14

squillace opened this issue Dec 11, 2019 · 5 comments
Assignees

Comments

@squillace
Copy link
Contributor

image

@itowlson
Copy link
Contributor

Last time I looked at this, @azure/arm-containerservice didn't actually work for us - I think it didn't play nicely with the credentials that the Azure Account extension gave us. I think I raised an issue for that but I can't remember where or find it now... anyway @Tatsinnit has bravely volunteered to pick this one up so hopefully he will be able to get it sorted!

@Tatsinnit
Copy link
Member

Tatsinnit commented May 28, 2020

👍 Thank you so much: @itowlson - I might have a fix for this, I might share\show\thought-share tomorrow as a fix for this, at least at this repo level. 🙈 (Linked Draft PR for your eyes) #23

@Tatsinnit
Copy link
Member

Tatsinnit commented Jun 9, 2020

💡 I am re-opening this, because I can see with the changes type fix we end up in a internal error for MS-Rest-JS in --> ServiceClient.ts ==> sendRequest which cause extension level type error. Thanks heaps.

i.e. even if I do the type morphing the ServiceClientCredentials for will vary, and essentially when ms-rest-js reaches the senRequest I see an obscure i.e. not so helpful message so not sure what I can gather from that.

@Tatsinnit Tatsinnit reopened this Jun 9, 2020
@Tatsinnit
Copy link
Member

Tatsinnit commented Jun 9, 2020

Hiya guys @philliphoff & @itowlson 🛡️ 🤖

Below is my 2 cent finding of how this update will break existing merge config and save kubeconfig fucntionality.

Weird ms-rest-js ==> serviceClient.ts failure led to more deep dependency issue.

I am sure new package is bigger and better, butI really think that this whole @azure/containerservices or arm-resource et. al. packages change was not thought through and they contain breaking changes from the original packages, and mere: https://github.com/Azure/azure-sdk-for-js/blob/master/documentation/Migration.md is not full thought through for various other dependencies 🐉

Here is the weird behaviour I see so I am planning to revert my changes and keep using old packages until we have clear plan to tackle this. Please advice.

Lets Dig Deeper

  • We use vscode-azureextensionui which has ISubscriptionContext dependency which we use for our credential to be types as ServiceClientCredentials Now this is dependent on ms-rest i.e. NOT ms-rest-js :) and surely ms-rest-js has done this differently in new implementation because I see signRequest has different return signature + even simple ugly type conversation let it fail at the ms-rest-js ==> ServiceClient.ts on this line https://github.com/Azure/ms-rest-js/blob/master/lib/serviceClient.ts#L328 . https://github.com/Azure/vscode-aks-tools/blob/master/src/tree/azureAccountTreeItem.ts#L5

  • Gyst: I noticed that when we upgraded our packages to latest @azure/arm-containerservice **Why ms-rest-js fails at ms-rest-js ==> sendRequest then I realised that might have to do with the type conversion. Which points that ms-rest-js have some sort of different way of handling the sendRequest vs ms-rest. 🐓

Plausible solution with a But :

  • Seems like only way to correctly use is to Change the depenedent on using alternative to using vscode-azureextensionui because the ServiceClientCredentials from this is dependent on ms-rest (that is deep, and do we have and alternative at all for this) - I think not at this stage.

To unblock this for now:

  • I propose we keep using the old one until be have a plan or you guys think that there is an easy alternative to the types we used at clusterTreeItem level etc...

Thanks heaps in taking time for reading this, I thought I will do a quick idea dump as to what are my findings and get your pinions to move forward for this. : = )

@Tatsinnit
Copy link
Member

Tatsinnit commented Jun 9, 2020

💡 -- Thanks @itowlson for quick chat and you summed it well, i..e bunch of stuff not talking nicely to each other with this extension is consuming so I am going ahead and reverting these changes.

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

No branches or pull requests

3 participants