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

Fix deployment warnings to only show if no resources found #10878

Merged
merged 1 commit into from
Jun 12, 2020

Conversation

Charles-Gagnon
Copy link
Contributor

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.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.06%) to 34.464% when pulling 2696f7d on chgagnon/fixDeploymentWarnings into f862d77 on master.

private azurecoreApi: azurecore.IExtension | undefined;

public async getAzurecoreApi(): Promise<azurecore.IExtension> {
if (!this.azurecoreApi) {
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

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.

Copy link
Contributor Author

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)

Copy link
Member

@llali llali left a comment

Choose a reason for hiding this comment

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

:shipit:

@Charles-Gagnon Charles-Gagnon merged commit 8db272c into master Jun 12, 2020
@Charles-Gagnon Charles-Gagnon deleted the chgagnon/fixDeploymentWarnings branch June 12, 2020 00:07
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.

Access denied when fetching Azure resource groups
4 participants