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

Bump github.com/grafana/grafana-plugin-sdk-go from 0.176.0 to 0.178.0 #64

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/grafana/grafana-llm-app
go 1.19

require (
github.com/grafana/grafana-plugin-sdk-go v0.176.0
github.com/grafana/grafana-plugin-sdk-go v0.178.0
github.com/launchdarkly/eventsource v1.7.1
github.com/qdrant/go-client v1.5.0
google.golang.org/grpc v1.58.2
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/grafana/grafana-plugin-sdk-go v0.176.0 h1:dayiqGR6uJyJBO8rRTp/E7oKsnEjNSS0p7vVkXy/Brw=
github.com/grafana/grafana-plugin-sdk-go v0.176.0/go.mod h1:9crAQqSzxvPe0VKC/T23cd+2I9TZb43yoOcUL/qZ5FU=
github.com/grafana/grafana-plugin-sdk-go v0.178.0 h1:/05wMOSutuMZ/PaRnYHaImPasgblr4x+DMMT4d5Yqmk=
github.com/grafana/grafana-plugin-sdk-go v0.178.0/go.mod h1:9crAQqSzxvPe0VKC/T23cd+2I9TZb43yoOcUL/qZ5FU=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
Expand Down
3 changes: 2 additions & 1 deletion pkg/plugin/app.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package plugin

import (
"context"
"net/http"

"github.com/grafana/grafana-llm-app/pkg/plugin/vector"
Expand Down Expand Up @@ -29,7 +30,7 @@ type App struct {
}

// NewApp creates a new example *App instance.
func NewApp(appSettings backend.AppInstanceSettings) (instancemgmt.Instance, error) {
func NewApp(ctx context.Context, appSettings backend.AppInstanceSettings) (instancemgmt.Instance, error) {
log.DefaultLogger.Debug("Creating new app instance")
var app App

Expand Down
5 changes: 3 additions & 2 deletions pkg/plugin/health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ func TestCheckHealth(t *testing.T) {
},
} {
t.Run(tc.name, func(t *testing.T) {
ctx := context.Background()
// Initialize app
inst, err := NewApp(tc.settings)
inst, err := NewApp(ctx, tc.settings)
if err != nil {
t.Fatalf("new app: %s", err)
}
Expand All @@ -108,7 +109,7 @@ func TestCheckHealth(t *testing.T) {
t.Fatal("inst must be of type *App")
}
// Request by calling CheckHealth.
resp, err := app.CheckHealth(context.Background(), &backend.CheckHealthRequest{
resp, err := app.CheckHealth(ctx, &backend.CheckHealthRequest{
PluginContext: backend.PluginContext{
AppInstanceSettings: &tc.settings,
},
Expand Down
5 changes: 3 additions & 2 deletions pkg/plugin/resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ func (s *mockCallResourceResponseSender) Send(response *backend.CallResourceResp
// TestCallResource tests CallResource calls, using backend.CallResourceRequest and backend.CallResourceResponse.
// This ensures the httpadapter for CallResource works correctly.
func TestCallResource(t *testing.T) {
ctx := context.Background()
// Initialize app
inst, err := NewApp(backend.AppInstanceSettings{})
inst, err := NewApp(ctx, backend.AppInstanceSettings{})
if err != nil {
t.Fatalf("new app: %s", err)
}
Expand Down Expand Up @@ -58,7 +59,7 @@ func TestCallResource(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
// Request by calling CallResource. This tests the httpadapter.
var r mockCallResourceResponseSender
err = app.CallResource(context.Background(), &backend.CallResourceRequest{
err = app.CallResource(ctx, &backend.CallResourceRequest{
Method: tc.method,
Path: tc.path,
Body: tc.body,
Expand Down