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

AzureMonitor: Support multi-resource aliases and subscription aliases #68648

Merged
merged 1 commit into from
May 22, 2023

Conversation

aangelisc
Copy link
Contributor

@aangelisc aangelisc commented May 17, 2023

This PR adds support for two things:

  • Legend aliases for multiple resource queries
  • Subscription name and subscription ID legend aliases

New functionality has been added to retrieve the subscription name based off of the subscription ID to avoid running a migration in the front-end. These requests are efficient and are only executed if the display name is not already available to the datasource instance.

Legend aliases are now based on the current resource (based on the resource URI) rather than relying on just the ID returned in the series.

Fixes grafana/support-escalations#5920
Fixes grafana/support-escalations#5964

- Add subscription response type
- Update AzureMonitorQuery type
- Update docs
- Update tests
- Add function to retrieve subscription display name if not present
@aangelisc aangelisc added this to the 10.0.x milestone May 17, 2023
@aangelisc aangelisc self-assigned this May 17, 2023
@aangelisc aangelisc requested review from a team, Eve832 and GrafanaWriter as code owners May 17, 2023 16:26
@aangelisc aangelisc requested review from bossinc and alyssabull and removed request for a team May 17, 2023 16:26
@grafanabot grafanabot added area/backend datasource/Azure Azure Monitor Datasource type/docs Flags the technical writing team for documentation support; auto adds to org-wide docs project labels May 17, 2023
@github-actions
Copy link
Contributor

Backend code coverage report for PR #68648

Plugin Main PR Difference
azuremonitor 70.7% 70.7% 0%

@github-actions
Copy link
Contributor

Frontend code coverage report for PR #68648
No changes

Copy link
Collaborator

@Eve832 Eve832 left a comment

Choose a reason for hiding this comment

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

lgtm

@aangelisc aangelisc merged commit bca8428 into main May 22, 2023
@aangelisc aangelisc deleted the andreas/update-legend-aliases branch May 22, 2023 10:03
grafanabot pushed a commit that referenced this pull request May 22, 2023
…#68648)

Update legend aliases

- Add subscription response type
- Update AzureMonitorQuery type
- Update docs
- Update tests
- Add function to retrieve subscription display name if not present

(cherry picked from commit bca8428)
@grafanabot

This comment was marked as duplicate.

@grafanabot grafanabot added the backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. label May 22, 2023
aangelisc added a commit that referenced this pull request May 22, 2023
…#68648)

Update legend aliases

- Add subscription response type
- Update AzureMonitorQuery type
- Update docs
- Update tests
- Add function to retrieve subscription display name if not present

(cherry picked from commit bca8428)
@aangelisc aangelisc removed the backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. label May 22, 2023
@grafanabot
Copy link
Contributor

The backport to v10.0.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-68648-to-v10.0.x origin/v10.0.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x bca8428f639613e35e9ad61728e0f11841d6b6ad
# Push it to GitHub
git push --set-upstream origin backport-68648-to-v10.0.x
git switch main
# Remove the local backport branch
git branch -D backport-68648-to-v10.0.x

Then, create a pull request where the base branch is v10.0.x and the compare/head branch is backport-68648-to-v10.0.x.

@grafanabot grafanabot added the backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. label May 22, 2023
aangelisc added a commit that referenced this pull request May 23, 2023
…on aliases (#68823)

AzureMonitor: Support multi-resource aliases and subscription aliases (#68648)

Update legend aliases

- Add subscription response type
- Update AzureMonitorQuery type
- Update docs
- Update tests
- Add function to retrieve subscription display name if not present

(cherry picked from commit bca8428)
@zerok zerok modified the milestones: 10.0.x, 10.0.0-preview, 10.1.x May 31, 2023
@ricky-undeadcoders ricky-undeadcoders modified the milestones: 10.1.x, 10.1.0 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/backend backport v10.0.x backport-failed Failed to generate backport PR. Please resolve conflicts and create one manually. datasource/Azure Azure Monitor Datasource effort/small type/bug type/docs Flags the technical writing team for documentation support; auto adds to org-wide docs project
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants