-
Notifications
You must be signed in to change notification settings - Fork 929
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
Fix deployment warnings to only show if no resources found #10878
Conversation
private azurecoreApi: azurecore.IExtension | undefined; | ||
|
||
public async getAzurecoreApi(): Promise<azurecore.IExtension> { | ||
if (!this.azurecoreApi) { |
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.
this won't wont return error for when user doesn't have access to tenant like the previous one did?
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.
What do you mean? This method is just getting the azurecore API through which you call getSubscriptions/getResourceGroups. Those calls are unchanged functionality-wise.
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.
hmm ok my mistake, I thought those were in different extension and you're using new APIs.
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.
They are in a different extension (azurecore)
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.
Fixes #9651
Now we only display an error if we didn't get any resource groups/subscriptions from these calls.
I also took this opportunity to move the functions from commands to being actual API calls.
The azdata change is non-breaking, this was something that was already true and so this is just making it so the actual API has the expected return type.