Skip to content

Conversation

sd2k
Copy link
Collaborator

@sd2k sd2k commented May 16, 2025

There was a bunch of duplicated code when creating the Grafana client from
context, and I want to be able to do this in tests too, so this just refactors
the code for later.

There was a bunch of duplicated code when creating the Grafana client from
context, and I want to be able to do this in tests too, so this just refactors
the code for later.
sd2k added a commit that referenced this pull request May 16, 2025
Using the refactored NewGrafanaClient function from
PR #127.
@sd2k sd2k marked this pull request as ready for review May 16, 2025 10:51
@sd2k sd2k requested a review from a team as a code owner May 16, 2025 10:51
* Add log lines when creating Sift investigation

Should help debug issues when running Sift tools.

* Include Grafana client in cloud test context

Using the refactored NewGrafanaClient function from
PR #127.

* Fetch multiple investigations in tests, in case the first one has no analyses

This can happen if, for example, an investigation was run with a scope
that didn't find any logs, and so no analyses were created.

* Add test for finding error pattern logs

This relies on a new Loki datasource being added to the mcptests
instance, which points to our dev logs. We probably want to get rid of
this and use different logs; I'll look into how we can do that.
Copy link
Contributor

@annanay25 annanay25 left a comment

Choose a reason for hiding this comment

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

lgtm

@sd2k sd2k merged commit fbabf75 into main May 16, 2025
10 checks passed
@sd2k sd2k deleted the refactor-client-creation branch May 16, 2025 16:28
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