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

Explore: Init with mixed DS if there's no root DS in the URL and queries have multiple datasources #80068

Merged
merged 1 commit into from Jan 5, 2024

Conversation

Elfo404
Copy link
Member

@Elfo404 Elfo404 commented Jan 5, 2024

What is this feature?

Select mixed datasource when accessing Explore with a URL that has not root level datasource defined but multiple queries with different datasources.
Although is not technically possible to generate such URLs from explore itself, this should be the correct behaviour if URLs are tampered with/generated externally.

Previously, if opening Explore with such a URL, the root level DS was set to the first query's DS and all other queries discarded, with this change the "mixed" ds is correctly inferred and no query is is discarded (as long as they have a valid datasource)

Why do we need this feature?

More robust URL parsing and state initialization in Explore.l

Who is this feature for?

Explore users

Which issue(s) does this PR fix?:

Fixes #69689

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

How to test this

Given how unique ids are generated for datasources i can't provide premade links, however this should be quite easy to test:

  • navigate to explore, select mixed datasource and set queries with 2 (or more) different datasources.
  • copy the URL and remove the root level datasource property from it
  • Navigate to that URL. before this change you'd see only queries having the datasource equal to the first query's datasource, and the pane datasource set to said DS. with this change you should see mixed.

@Elfo404 Elfo404 added this to the 10.4.x milestone Jan 5, 2024
@Elfo404 Elfo404 requested a review from a team as a code owner January 5, 2024 11:42
@grafana-delivery-bot grafana-delivery-bot bot modified the milestones: 10.4.x, 10.3.x Jan 5, 2024
Copy link
Contributor

@ifrost ifrost left a comment

Choose a reason for hiding this comment

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

@Elfo404 Elfo404 merged commit 8bd053e into main Jan 5, 2024
28 checks passed
@Elfo404 Elfo404 deleted the gio/feat/explore-no-root-multiple-ds branch January 5, 2024 14:19
zserge pushed a commit that referenced this pull request Jan 22, 2024
@summerwollin summerwollin modified the milestones: 10.3.x, 10.3.0 Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explore: select mixed datasource when URL contains no root DS but mixed queries
3 participants