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 various errors #187

Merged
merged 4 commits into from
Jun 28, 2024
Merged

Fix various errors #187

merged 4 commits into from
Jun 28, 2024

Conversation

KeesCBakker
Copy link
Collaborator

@KeesCBakker KeesCBakker commented Jun 24, 2024

This PR fixes some problems:

  • Fixes the way we construct the full URL, especially when people end the host with a /. The new expandUrl helps to create a URL that is acceptable.
  • Error handling: in some cases Grafana will return an HTML page, we don't want that as part of our error object.
  • When the first API call of getUidBySlug errors out, this can cause an infinite loop. We now break on the first problem. Also, paging was broken, so if you have +5000 dashboards, you could not get the right dashboard.

@stephenyeargin
Copy link
Owner

so if you have +5000 dashboards, you could not get the right dashboard.

... That's a lot. 😅 I sure hope they are programmatically created, and that the template feature in Grafana was explored.

Copy link
Owner

@stephenyeargin stephenyeargin left a comment

Choose a reason for hiding this comment

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

This is good. I'd ask for test cases around the new expandUrl method, but that's not a blocker and can be added in a later spring cleaning task.

@stephenyeargin
Copy link
Owner

May fix #105

@stephenyeargin stephenyeargin merged commit 5ec4dd1 into main Jun 28, 2024
4 checks passed
@stephenyeargin stephenyeargin deleted the fix-infinite-loop branch June 28, 2024 03:53
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.

2 participants