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

Loki: Always fetch for new label keys in the QueryBuilder #64597

Merged
merged 2 commits into from Mar 10, 2023

Conversation

svennergr
Copy link
Contributor

What is this feature?

Currently labelkeys are not always fetch when trying to select a label.

Special notes for your reviewer:

  1. Start Grafana and a Loki devenv.
  2. Go to Explore and select your Loki datasource.
  3. Select a timerange with no logs present.
  4. Open the Labels dropdown in the Loki QueryBuilder
  5. See No options found.
  6. Select a timerange with logs present.
  7. Without the fix see No options found. With the fix see your labels.

With the fix:

Screen.Recording.2023-03-10.at.12.33.51.mov

Without the fix:

Screen.Recording.2023-03-10.at.12.35.02.mov

@svennergr svennergr added this to the 9.5.0 milestone Mar 10, 2023
@svennergr svennergr requested a review from a team as a code owner March 10, 2023 11:35
@svennergr svennergr self-assigned this Mar 10, 2023
Copy link
Member

@ivanahuckova ivanahuckova left a comment

Choose a reason for hiding this comment

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

The change looks good, but I think that refreshLogLabels is not used anywhere anymore and therefore we can remove it.

Otherwise LGTM!

@github-actions
Copy link
Contributor

Backend code coverage report for PR #64597
No changes

@github-actions
Copy link
Contributor

github-actions bot commented Mar 10, 2023

Frontend code coverage report for PR #64597

Plugin Main PR Difference
loki 83.62% 83.7% .08%

Copy link
Member

@ivanahuckova ivanahuckova left a comment

Choose a reason for hiding this comment

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

Nice! LGTM.

@svennergr svennergr merged commit b46771c into main Mar 10, 2023
7 checks passed
@svennergr svennergr deleted the svennergr/fix-loki-query-builder-label-fetch branch March 10, 2023 12:13
eleijonmarck pushed a commit that referenced this pull request Mar 13, 2023
* always fetch new labels

* remove refreshLogLabels
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.

None yet

3 participants