From 06cc39b41236b360b26228e5e27aa6339cdb70b1 Mon Sep 17 00:00:00 2001 From: yesoreyeram <153843+yesoreyeram@users.noreply.github.com> Date: Fri, 19 Jun 2026 11:00:38 +0100 Subject: [PATCH 1/5] dsconfig: base schema --- cspell.config.json | 7 +- go.mod | 69 +++++++----- go.sum | 84 ++++++++++++++ package.json | 4 +- pkg/github/sql_handler_test.go | 9 +- pkg/github/stargazers_test.go | 4 + pkg/models/settings.go | 38 +++++-- pkg/models/settings_test.go | 8 +- pkg/schema/dsconfig.json | 152 ++++++++++++++++++++++++++ pkg/schema/schema.gen.json | 62 +++++++++++ pkg/schema/schema.go | 45 ++++++++ pkg/schema/schema_test.go | 48 ++++++++ pkg/schema/settings.examples.gen.json | 3 + pkg/schema/settings.gen.json | 59 ++++++++++ webpack.config.ts | 41 +++++++ 15 files changed, 587 insertions(+), 46 deletions(-) create mode 100644 pkg/schema/dsconfig.json create mode 100644 pkg/schema/schema.gen.json create mode 100644 pkg/schema/schema.go create mode 100644 pkg/schema/schema_test.go create mode 100644 pkg/schema/settings.examples.gen.json create mode 100644 pkg/schema/settings.gen.json create mode 100644 webpack.config.ts diff --git a/cspell.config.json b/cspell.config.json index fe8206f3..eff7552a 100644 --- a/cspell.config.json +++ b/cspell.config.json @@ -11,9 +11,14 @@ "query.types.json", "yarn.lock" ], - "ignoreRegExpList": ["import\\s*\\((.|[\r\n])*?\\)", "import\\s*.*\".*?\""], + "ignoreRegExpList": [ + "import\\s*\\((.|[\r\n])*?\\)", + "import\\s*.*\".*?\"" + ], "words": [ "apiserver", + "dsconfig", + "dsschema", "dataplane", "araddon", "bmike", diff --git a/go.mod b/go.mod index 44c37c47..8e32417b 100644 --- a/go.mod +++ b/go.mod @@ -1,11 +1,11 @@ module github.com/grafana/github-datasource -go 1.26.1 +go 1.26.4 require ( github.com/bradleyfalzon/ghinstallation/v2 v2.18.0 github.com/google/go-github/v84 v84.0.0 - github.com/grafana/grafana-plugin-sdk-go v0.291.1 + github.com/grafana/grafana-plugin-sdk-go v0.292.1 github.com/grafana/schemads v0.0.8 github.com/influxdata/tdigest v0.0.1 github.com/pkg/errors v0.9.1 @@ -17,26 +17,38 @@ require ( require ( github.com/BurntSushi/toml v1.6.0 // indirect - github.com/apache/arrow-go/v18 v18.5.2 // indirect + github.com/apache/arrow-go/v18 v18.6.0 // indirect github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/clipperhouse/displaywidth v0.10.0 // indirect - github.com/clipperhouse/uax29/v2 v2.6.0 // indirect + github.com/clipperhouse/uax29/v2 v2.7.0 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/emicklei/go-restful/v3 v3.13.0 // indirect github.com/fatih/color v1.18.0 // indirect github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-openapi/jsonpointer v0.22.5 // indirect github.com/go-openapi/jsonreference v0.21.5 // indirect - github.com/go-openapi/swag v0.23.0 // indirect + github.com/go-openapi/swag v0.25.4 // indirect + github.com/go-openapi/swag/cmdutils v0.25.4 // indirect + github.com/go-openapi/swag/conv v0.26.0 // indirect + github.com/go-openapi/swag/fileutils v0.25.5 // indirect github.com/go-openapi/swag/jsonname v0.25.5 // indirect - github.com/goccy/go-json v0.10.5 // indirect + github.com/go-openapi/swag/jsonutils v0.26.0 // indirect + github.com/go-openapi/swag/loading v0.26.0 // indirect + github.com/go-openapi/swag/mangling v0.25.5 // indirect + github.com/go-openapi/swag/netutils v0.25.4 // indirect + github.com/go-openapi/swag/stringutils v0.25.5 // indirect + github.com/go-openapi/swag/typeutils v0.26.0 // indirect + github.com/go-openapi/swag/yamlutils v0.26.0 // indirect + github.com/goccy/go-json v0.10.6 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.2 // indirect github.com/google/gnostic-models v0.7.0 // indirect github.com/google/go-querystring v1.2.0 // indirect github.com/google/uuid v1.6.0 // indirect + github.com/grafana/dsconfig/dsconfig v0.0.1 // indirect + github.com/grafana/dsconfig/schema v0.0.1 // indirect github.com/grafana/otel-profiling-go v0.5.1 // indirect github.com/grafana/pyroscope-go/godeltaprof v0.1.9 // indirect github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0 // indirect @@ -49,7 +61,7 @@ require ( github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/jszwedko/go-datemath v0.1.1-0.20230526204004-640a500621d6 // indirect - github.com/klauspost/compress v1.18.4 // indirect + github.com/klauspost/compress v1.18.5 // indirect github.com/klauspost/cpuid/v2 v2.3.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.14 // indirect @@ -61,7 +73,7 @@ require ( github.com/olekukonko/errors v1.2.0 // indirect github.com/olekukonko/ll v0.1.6 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect - github.com/pierrec/lz4/v4 v4.1.25 // indirect + github.com/pierrec/lz4/v4 v4.1.26 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8 // indirect github.com/unknwon/com v1.0.1 // indirect @@ -69,30 +81,31 @@ require ( github.com/urfave/cli v1.22.17 // indirect github.com/zeebo/xxh3 v1.1.0 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.67.0 // indirect - go.opentelemetry.io/contrib/propagators/jaeger v1.42.0 // indirect - go.opentelemetry.io/contrib/samplers/jaegerremote v0.36.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.68.0 // indirect + go.opentelemetry.io/contrib/propagators/jaeger v1.43.0 // indirect + go.opentelemetry.io/contrib/samplers/jaegerremote v0.37.0 // indirect go.opentelemetry.io/otel v1.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.42.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.42.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0 // indirect go.opentelemetry.io/otel/metric v1.43.0 // indirect go.opentelemetry.io/otel/sdk v1.43.0 // indirect go.opentelemetry.io/otel/trace v1.43.0 // indirect - go.opentelemetry.io/proto/otlp v1.9.0 // indirect + go.opentelemetry.io/proto/otlp v1.10.0 // indirect go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect - golang.org/x/mod v0.34.0 // indirect + golang.org/x/mod v0.35.0 // indirect golang.org/x/sync v0.20.0 // indirect - golang.org/x/telemetry v0.0.0-20260311193753-579e4da9a98c // indirect - golang.org/x/tools v0.43.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171 // indirect + golang.org/x/telemetry v0.0.0-20260409153401-be6f6cb8b1fa // indirect + golang.org/x/tools v0.44.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d // indirect gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/kube-openapi v0.0.0-20260127142750-a19766b6e2d4 // indirect + k8s.io/kube-openapi v0.0.0-20260603220949-865597e52e25 // indirect sigs.k8s.io/randfill v1.0.0 // indirect + sigs.k8s.io/yaml v1.6.0 // indirect ) require ( @@ -107,9 +120,9 @@ require ( github.com/hashicorp/go-hclog v1.6.3 // indirect github.com/hashicorp/go-plugin v1.7.0 // indirect github.com/hashicorp/yamux v0.1.2 // indirect - github.com/magefile/mage v1.16.1 // indirect + github.com/magefile/mage v1.17.2 // indirect github.com/mattetti/filebuffer v1.0.1 // indirect - github.com/mattn/go-runewidth v0.0.19 // indirect + github.com/mattn/go-runewidth v0.0.20 // indirect github.com/oklog/run v1.1.0 // indirect github.com/olekukonko/tablewriter v1.1.4 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect @@ -118,10 +131,10 @@ require ( github.com/prometheus/common v0.67.5 // indirect github.com/prometheus/procfs v0.16.1 // indirect github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29 // indirect - golang.org/x/net v0.53.0 // indirect - golang.org/x/sys v0.43.0 // indirect - golang.org/x/text v0.36.0 // indirect + golang.org/x/net v0.55.0 // indirect + golang.org/x/sys v0.45.0 // indirect + golang.org/x/text v0.37.0 // indirect golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect - google.golang.org/grpc v1.79.3 // indirect + google.golang.org/grpc v1.80.0 // indirect google.golang.org/protobuf v1.36.11 // indirect ) diff --git a/go.sum b/go.sum index df3c3e25..e064b12d 100644 --- a/go.sum +++ b/go.sum @@ -4,8 +4,11 @@ github.com/BurntSushi/toml v1.6.0 h1:dRaEfpa2VI55EwlIW72hMRHdWouJeRF7TPYhI+AUQjk github.com/BurntSushi/toml v1.6.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ= github.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= +github.com/andybalholm/brotli v1.2.1 h1:R+f5xP285VArJDRgowrfb9DqL18yVK0gKAW/F+eTWro= github.com/apache/arrow-go/v18 v18.5.2 h1:3uoHjoaEie5eVsxx/Bt64hKwZx4STb+beAkqKOlq/lY= github.com/apache/arrow-go/v18 v18.5.2/go.mod h1:yNoizNTT4peTciJ7V01d2EgOkE1d0fQ1vZcFOsVtFsw= +github.com/apache/arrow-go/v18 v18.6.0 h1:GX/Jyd3R7mCLiECAwY9FWbbaYblie2WXBSz4Sw8fNpM= +github.com/apache/arrow-go/v18 v18.6.0/go.mod h1:gm3MiPpY82fLYK5VKPB3WoJbsiLVDfT7flD5/vHReKw= github.com/apache/thrift v0.22.0 h1:r7mTJdj51TMDe6RtcmNdQxgn9XcyfGDOzegMDRg47uc= github.com/apache/thrift v0.22.0/go.mod h1:1e7J/O1Ae6ZQMTYdy9xa3w9k+XHWPfRvdPyJeynQ+/g= github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de h1:FxWPpzIjnTlhPwqqXc4/vE0f7GvRjuAsbW+HOIe8KnA= @@ -26,6 +29,8 @@ github.com/clipperhouse/displaywidth v0.10.0 h1:GhBG8WuerxjFQQYeuZAeVTuyxuX+Urai github.com/clipperhouse/displaywidth v0.10.0/go.mod h1:XqJajYsaiEwkxOj4bowCTMcT1SgvHo9flfF3jQasdbs= github.com/clipperhouse/uax29/v2 v2.6.0 h1:z0cDbUV+aPASdFb2/ndFnS9ts/WNXgTNNGFoKXuhpos= github.com/clipperhouse/uax29/v2 v2.6.0/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g= +github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk= +github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo= github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= @@ -35,6 +40,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes= +github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= @@ -54,12 +61,36 @@ github.com/go-openapi/jsonreference v0.21.5 h1:6uCGVXU/aNF13AQNggxfysJ+5ZcU4nEAe github.com/go-openapi/jsonreference v0.21.5/go.mod h1:u25Bw85sX4E2jzFodh1FOKMTZLcfifd1Q+iKKOUxExw= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-openapi/swag v0.25.4 h1:OyUPUFYDPDBMkqyxOTkqDYFnrhuhi9NR6QVUvIochMU= +github.com/go-openapi/swag v0.25.4/go.mod h1:zNfJ9WZABGHCFg2RnY0S4IOkAcVTzJ6z2Bi+Q4i6qFQ= +github.com/go-openapi/swag/cmdutils v0.25.4 h1:8rYhB5n6WawR192/BfUu2iVlxqVR9aRgGJP6WaBoW+4= +github.com/go-openapi/swag/cmdutils v0.25.4/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= +github.com/go-openapi/swag/conv v0.26.0 h1:5yGGsPYI1ZCva93U0AoKi/iZrNhaJEjr324YVsiD89I= +github.com/go-openapi/swag/conv v0.26.0/go.mod h1:tpAmIL7X58VPnHHiSO4uE3jBeRamGsFsfdDeDtb5ECE= +github.com/go-openapi/swag/fileutils v0.25.5 h1:B6JTdOcs2c0dBIs9HnkyTW+5gC+8NIhVBUwERkFhMWk= +github.com/go-openapi/swag/fileutils v0.25.5/go.mod h1:V3cT9UdMQIaH4WiTrUc9EPtVA4txS0TOmRURmhGF4kc= github.com/go-openapi/swag/jsonname v0.25.5 h1:8p150i44rv/Drip4vWI3kGi9+4W9TdI3US3uUYSFhSo= github.com/go-openapi/swag/jsonname v0.25.5/go.mod h1:jNqqikyiAK56uS7n8sLkdaNY/uq6+D2m2LANat09pKU= +github.com/go-openapi/swag/jsonutils v0.26.0 h1:FawFML2iAXsPqmERscuMPIHmFsoP1tOqWkxBaKNMsnA= +github.com/go-openapi/swag/jsonutils v0.26.0/go.mod h1:2VmA0CJlyFqgawOaPI9psnjFDqzyivIqLYN34t9p91E= +github.com/go-openapi/swag/loading v0.26.0 h1:Apg6zaKhCJurpJer0DCxq99qwmhFddBhaMX7kilDcko= +github.com/go-openapi/swag/loading v0.26.0/go.mod h1:dBxQ/6V2uBaAQdevN18VELE6xSpJWZxLX4txe12JwDg= +github.com/go-openapi/swag/mangling v0.25.5 h1:hyrnvbQRS7vKePQPHHDso+k6CGn5ZBs5232UqWZmJZw= +github.com/go-openapi/swag/mangling v0.25.5/go.mod h1:6hadXM/o312N/h98RwByLg088U61TPGiltQn71Iw0NY= +github.com/go-openapi/swag/netutils v0.25.4 h1:Gqe6K71bGRb3ZQLusdI8p/y1KLgV4M/k+/HzVSqT8H0= +github.com/go-openapi/swag/netutils v0.25.4/go.mod h1:m2W8dtdaoX7oj9rEttLyTeEFFEBvnAx9qHd5nJEBzYg= +github.com/go-openapi/swag/stringutils v0.25.5 h1:NVkoDOA8YBgtAR/zvCx5rhJKtZF3IzXcDdwOsYzrB6M= +github.com/go-openapi/swag/stringutils v0.25.5/go.mod h1:PKK8EZdu4QJq8iezt17HM8RXnLAzY7gW0O1KKarrZII= +github.com/go-openapi/swag/typeutils v0.26.0 h1:2kdEwdiNWy+JJdOvu5MA2IIg2SylWAFuuyQIKYybfq4= +github.com/go-openapi/swag/typeutils v0.26.0/go.mod h1:oovDuIUvTrEHVMqWilQzKzV4YlSKgyZmFh7AlfABNVE= +github.com/go-openapi/swag/yamlutils v0.26.0 h1:H7O8l/8NJJQ/oiReEN+oMpnGMyt8G0hl460nRZxhLMQ= +github.com/go-openapi/swag/yamlutils v0.26.0/go.mod h1:1evKEGAtP37Pkwcc7EWMF0hedX0/x3Rkvei2wtG/TbU= github.com/go-openapi/testify/v2 v2.4.0 h1:8nsPrHVCWkQ4p8h1EsRVymA2XABB4OT40gcvAu+voFM= github.com/go-openapi/testify/v2 v2.4.0/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4= github.com/goccy/go-json v0.10.5/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/goccy/go-json v0.10.6 h1:p8HrPJzOakx/mn/bQtjgNjdTcN+/S6FcG2CTtQOrHVU= +github.com/goccy/go-json v0.10.6/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -87,8 +118,14 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1ks85zJ1lfDGgIiMDuIptTOhJq+zKyg= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/grafana/dsconfig/dsconfig v0.0.1 h1:Z+D0kToEUs01kdent4+QU75zqNsEXJf1CblGL4oKAns= +github.com/grafana/dsconfig/dsconfig v0.0.1/go.mod h1:snIIxl//Dxgym/8+Qqre5rQkaGTPoiQYavuZNTQ0NXs= +github.com/grafana/dsconfig/schema v0.0.1 h1:cKBhoCzc4kb2X/L+9VItXseXdZMuPXkvxKsBunI8Ieo= +github.com/grafana/dsconfig/schema v0.0.1/go.mod h1:ArIpq5Ua6K9aUGUcUSYSD0rJd47kQbTvFL/zS5UovRs= github.com/grafana/grafana-plugin-sdk-go v0.291.1 h1:Z/zhv2EXiBE1oT/IGjE0CnN+MfW7zaCTJ7QB5eotjBU= github.com/grafana/grafana-plugin-sdk-go v0.291.1/go.mod h1:qTjY9ymtF0ughH8xdXk8WNejJvwB2J2epeMBdauaIB0= +github.com/grafana/grafana-plugin-sdk-go v0.292.1 h1:8wvKUqIOtbHC43WIr6kheIGdV6q4SMyWU9+jxcUA6mE= +github.com/grafana/grafana-plugin-sdk-go v0.292.1/go.mod h1:RM/Ku+hoyicIO/UVsGeFJfed/3/iXaCT3opiwE69THY= github.com/grafana/otel-profiling-go v0.5.1 h1:stVPKAFZSa7eGiqbYuG25VcqYksR6iWvF3YH66t4qL8= github.com/grafana/otel-profiling-go v0.5.1/go.mod h1:ftN/t5A/4gQI19/8MoWurBEtC6gFw8Dns1sJZ9W4Tls= github.com/grafana/pyroscope-go/godeltaprof v0.1.9 h1:c1Us8i6eSmkW+Ez05d3co8kasnuOY813tbMN8i/a3Og= @@ -136,6 +173,8 @@ github.com/klauspost/asmfmt v1.3.2 h1:4Ri7ox3EwapiOjCki+hw14RyKk201CN4rzyCJRFLpK github.com/klauspost/asmfmt v1.3.2/go.mod h1:AG8TuvYojzulgDAMCnYn50l/5QV3Bs/tp6j0HLHbNSE= github.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c= github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4= +github.com/klauspost/compress v1.18.5 h1:/h1gH5Ce+VWNLSWqPzOVn6XBO+vJbCNGvjoaGBFW2IE= +github.com/klauspost/compress v1.18.5/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y= github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -146,6 +185,8 @@ github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/magefile/mage v1.16.1 h1:j5UwkdA48xTlGs0Hcm1Q3sSAcxBorntQjiewDNMsqlo= github.com/magefile/mage v1.16.1/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= +github.com/magefile/mage v1.17.2 h1:fyXVu1eadI8Ap1HCCNgEhJ5McIWiYhLR8uol64ZZc40= +github.com/magefile/mage v1.17.2/go.mod h1:Yj51kqllmsgFpvvSzgrZPK9WtluG3kUhFaBUVLo4feA= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattetti/filebuffer v1.0.1 h1:gG7pyfnSIZCxdoKq+cPa8T0hhYtD9NxCdI4D7PTjRLM= @@ -161,6 +202,8 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw= github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= +github.com/mattn/go-runewidth v0.0.20 h1:WcT52H91ZUAwy8+HUkdM3THM6gXqXuLJi9O3rjcQQaQ= +github.com/mattn/go-runewidth v0.0.20/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs= github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY= github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI= @@ -188,6 +231,8 @@ github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaR github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pierrec/lz4/v4 v4.1.25 h1:kocOqRffaIbU5djlIBr7Wh+cx82C0vtFb0fOurZHqD0= github.com/pierrec/lz4/v4 v4.1.25/go.mod h1:EoQMVJgeeEOMsCqCzqFm2O0cJvljX2nGZjcRIPL34O4= +github.com/pierrec/lz4/v4 v4.1.26 h1:GrpZw1gZttORinvzBdXPUXATeqlJjqUG/D87TKMnhjY= +github.com/pierrec/lz4/v4 v4.1.26/go.mod h1:EoQMVJgeeEOMsCqCzqFm2O0cJvljX2nGZjcRIPL34O4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -251,21 +296,34 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0 h1:yI1/OhfEPy7J9eoa6Sj051C7n5dvpj0QX8g4sRchg04= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.67.0/go.mod h1:NoUCKYWK+3ecatC4HjkRktREheMeEtrXoQxrqYFeHSc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0 h1:0Qx7VGBacMm9ZENQ7TnNObTYI4ShC+lHI16seduaxZo= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.68.0/go.mod h1:Sje3i3MjSPKTSPvVWCaL8ugBzJwik3u4smCjUeuupqg= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.67.0 h1:c9r/G1CSw4dPI1jaNNG9RnQP+q4SvZnHciDQJVIvchU= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.67.0/go.mod h1:gO9smoZe9KnZcJCqcB0lMmQ4Z5VEifYmjMTpnwtTSuQ= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.68.0 h1:cuXaPAfIoJKsYjBjPSb2nKZEmgM43zVr25l37IxhKME= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.68.0/go.mod h1:BuzhPofpCzlDi/Q/Xjg54M4/3oWqqyDe2Zeq7A2I0QE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 h1:OyrsyzuttWTSur2qN/Lm0m2a8yqyIjUVBZcxFPuXq2o= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0/go.mod h1:C2NGBr+kAB4bk3xtMXfZ94gqFDtg/GkI7e9zqGh5Beg= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 h1:CqXxU8VOmDefoh0+ztfGaymYbhdB/tT3zs79QaZTNGY= go.opentelemetry.io/contrib/propagators/jaeger v1.42.0 h1:jP8unWI6q5kcb3gpGLjKDGaUa+JW+nHKWvpS/q+YuWA= go.opentelemetry.io/contrib/propagators/jaeger v1.42.0/go.mod h1:xd89e/pUyPatUP1C4z1UknD9jHptESO99tWyvd4mWD4= +go.opentelemetry.io/contrib/propagators/jaeger v1.43.0 h1:peiLMz1+aqJE+3L4mOVtR9wlmv+yh/JVYXCBjqmzJJE= +go.opentelemetry.io/contrib/propagators/jaeger v1.43.0/go.mod h1:Agvif+4A8p/3UtZzJ0MCcDEuQwgtrzM71DueU41DCs8= go.opentelemetry.io/contrib/samplers/jaegerremote v0.36.0 h1:h8kHGv9+VIiJbQ2Qx6BbORZwcvVnd0le/SFK8Vom0bA= go.opentelemetry.io/contrib/samplers/jaegerremote v0.36.0/go.mod h1:tjrgaYHDx+1CmTk5YzNAUCbLX1ZrjrsogXBQHaVf7rI= +go.opentelemetry.io/contrib/samplers/jaegerremote v0.37.0 h1:MPbz6oY3ZM1GuzCdqKU2TSsE7W71W6e578f/m2q9rHw= +go.opentelemetry.io/contrib/samplers/jaegerremote v0.37.0/go.mod h1:+JlICiUxqOsm1bu6zTvygwOl5b5DRO+u8A+IgnL2ONs= go.opentelemetry.io/otel v1.21.0/go.mod h1:QZzNPQPm1zLX4gZK4cMi+71eaorMSGT3A4znnUvNNEo= go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I= go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.42.0 h1:THuZiwpQZuHPul65w4WcwEnkX2QIuMT+UFoOrygtoJw= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.42.0/go.mod h1:J2pvYM5NGHofZ2/Ru6zw/TNWnEQp5crgyDeSrYpXkAw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0 h1:88Y4s2C8oTui1LGM6bTWkw0ICGcOLCAI5l6zsD1j20k= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.43.0/go.mod h1:Vl1/iaggsuRlrHf/hfPJPvVag77kKyvrLeD10kpMl+A= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.42.0 h1:zWWrB1U6nqhS/k6zYB74CjRpuiitRtLLi68VcgmOEto= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.42.0/go.mod h1:2qXPNBX1OVRC0IwOnfo1ljoid+RD0QK3443EaqVlsOU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0 h1:RAE+JPfvEmvy+0LzyUA25/SGawPwIUbZ6u0Wug54sLc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.43.0/go.mod h1:AGmbycVGEsRx9mXMZ75CsOyhSP6MFIcj/6dnG+vhVjk= go.opentelemetry.io/otel/metric v1.21.0/go.mod h1:o1p3CA8nNHW8j5yuQLdc1eeqEaPfzug24uvsyIEJRWM= go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM= go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY= @@ -279,6 +337,8 @@ go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09 go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0= go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= +go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g= +go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= @@ -295,12 +355,16 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI= golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY= +golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM= +golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA= golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs= +golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8= +golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww= golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -321,12 +385,18 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI= golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/sys v0.45.0 h1:dO4czNzziLiiXplLQgBCEpCvXQ3dnkn0SdaZSYdQ+FY= +golang.org/x/sys v0.45.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/telemetry v0.0.0-20260311193753-579e4da9a98c h1:6a8FdnNk6bTXBjR4AGKFgUKuo+7GnR3FX5L7CbveeZc= golang.org/x/telemetry v0.0.0-20260311193753-579e4da9a98c/go.mod h1:TpUTTEp9frx7rTdLpC9gFG9kdI7zVLFTFFlqaH2Cncw= +golang.org/x/telemetry v0.0.0-20260409153401-be6f6cb8b1fa h1:efT73AJZfAAUV7SOip6pWGkwJDzIGiKBZGVzHYa+ve4= +golang.org/x/telemetry v0.0.0-20260409153401-be6f6cb8b1fa/go.mod h1:kHjTxDEnAu6/Nl9lDkzjWpR+bmKfxeiRuSDlsMb70gE= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg= golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164= +golang.org/x/text v0.37.0 h1:Cqjiwd9eSg8e0QAkyCaQTNHFIIzWtidPahFWR83rTrc= +golang.org/x/text v0.37.0/go.mod h1:a5sjxXGs9hsn/AJVwuElvCAo9v8QYLzvavO5z2PiM38= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -334,6 +404,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.43.0 h1:12BdW9CeB3Z+J/I/wj34VMl8X+fEXBxVR90JeMX5E7s= golang.org/x/tools v0.43.0/go.mod h1:uHkMso649BX2cZK6+RpuIPXS3ho2hZo4FVwfoy1vIk0= +golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c= +golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -346,10 +418,16 @@ gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57 h1:JLQynH/LBHfCTSbDWl+py8C+Rg/k1OVH3xfcaiANuF0= google.golang.org/genproto/googleapis/api v0.0.0-20260209200024-4cfbd4190f57/go.mod h1:kSJwQxqmFXeo79zOmbrALdflXQeAYcUbgS7PbpMknCY= +google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 h1:VPWxll4HlMw1Vs/qXtN7BvhZqsS9cdAittCNvVENElA= +google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9/go.mod h1:7QBABkRtR8z+TEnmXTqIqwJLlzrZKVfAUm7tY3yGv0M= google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171 h1:ggcbiqK8WWh6l1dnltU4BgWGIGo+EVYxCaAPih/zQXQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20260226221140-a57be14db171/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d h1:wT2n40TBqFY6wiwazVK9/iTWbsQrgk5ZfCSVFLO9LQA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260406210006-6f92a3bedf2d/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= google.golang.org/grpc v1.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE= google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= +google.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM= +google.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4= google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -364,11 +442,17 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= k8s.io/kube-openapi v0.0.0-20260127142750-a19766b6e2d4 h1:HhDfevmPS+OalTjQRKbTHppRIz01AWi8s45TMXStgYY= k8s.io/kube-openapi v0.0.0-20260127142750-a19766b6e2d4/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= +k8s.io/kube-openapi v0.0.0-20260603220949-865597e52e25 h1:mPMaPMpBij2V1Wv/fR+HW124vVGXXvOSS9ver/9yjWs= +k8s.io/kube-openapi v0.0.0-20260603220949-865597e52e25/go.mod h1:V/QaCUYDa+0QpcHhVVc5l99Uz56wEMEXBSj9oCDkNDY= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 h1:AZYQSJemyQB5eRxqcPky+/7EdBj0xi3g0ZcxxJ7vbWU= pgregory.net/rapid v1.2.0 h1:keKAYRcjm+e1F0oAuU5F5+YPAWcyxNNRK2wud503Gnk= pgregory.net/rapid v1.2.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/package.json b/package.json index 19c60ba1..d07cb0b5 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "license": "Apache-2.0", "author": "Grafana Labs (https://grafana.com)", "scripts": { - "build": "webpack -c ./.config/webpack/webpack.config.ts --env production", - "dev": "webpack -w -c ./.config/webpack/webpack.config.ts --env development", + "build": "webpack -c ./webpack.config.ts --env production", + "dev": "webpack -w -c ./webpack.config.ts --env development", "e2e": "playwright test", "lint": "eslint --cache .", "lint:fix": "yarn run lint --fix && prettier --write --list-different .", diff --git a/pkg/github/sql_handler_test.go b/pkg/github/sql_handler_test.go index 6ffe9da8..5d654fbb 100644 --- a/pkg/github/sql_handler_test.go +++ b/pkg/github/sql_handler_test.go @@ -6,12 +6,13 @@ import ( "github.com/grafana/github-datasource/pkg/models" "github.com/grafana/grafana-plugin-sdk-go/backend" + "github.com/grafana/grafana-plugin-sdk-go/config" "github.com/grafana/grafana-plugin-sdk-go/experimental/featuretoggles" ) func pluginCtxWithFeatureToggle() backend.PluginContext { return backend.PluginContext{ - GrafanaConfig: backend.NewGrafanaCfg(map[string]string{ + GrafanaConfig: config.NewGrafanaCfg(map[string]string{ featuretoggles.EnabledFeatures: "dsAbstractionApp", }), } @@ -808,7 +809,7 @@ func TestNormalizeGrafanaSQLRequestWithoutFeatureToggle(t *testing.T) { queryJSON := []byte(`{"refId":"A","grafanaSql":true,"table":"issues_grafana_grafana"}`) req := &backend.QueryDataRequest{ PluginContext: backend.PluginContext{ - GrafanaConfig: backend.NewGrafanaCfg(map[string]string{}), + GrafanaConfig: config.NewGrafanaCfg(map[string]string{}), }, Queries: []backend.DataQuery{ {RefID: "A", JSON: queryJSON}, @@ -827,7 +828,7 @@ func TestNormalizeGrafanaSQLRequestWithoutFeatureToggle(t *testing.T) { queryJSON := []byte(`{"refId":"A","queryType":"Pull_Requests","owner":"grafana","repository":"grafana"}`) req := &backend.QueryDataRequest{ PluginContext: backend.PluginContext{ - GrafanaConfig: backend.NewGrafanaCfg(map[string]string{}), + GrafanaConfig: config.NewGrafanaCfg(map[string]string{}), }, Queries: []backend.DataQuery{ {RefID: "A", JSON: queryJSON}, @@ -847,7 +848,7 @@ func TestNormalizeGrafanaSQLRequestWithoutFeatureToggle(t *testing.T) { normalQueryJSON := []byte(`{"refId":"B","queryType":"Pull_Requests","owner":"grafana","repository":"grafana"}`) req := &backend.QueryDataRequest{ PluginContext: backend.PluginContext{ - GrafanaConfig: backend.NewGrafanaCfg(map[string]string{}), + GrafanaConfig: config.NewGrafanaCfg(map[string]string{}), }, Queries: []backend.DataQuery{ {RefID: "A", JSON: sqlQueryJSON}, diff --git a/pkg/github/stargazers_test.go b/pkg/github/stargazers_test.go index b9359a49..a04473bc 100644 --- a/pkg/github/stargazers_test.go +++ b/pkg/github/stargazers_test.go @@ -44,6 +44,10 @@ func TestStargazersDataframe(t *testing.T) { t.Fatal(err) } + // Force a fixed +0000 zone so the rendered time is deterministic across + // environments/Go versions (always "+0000" instead of "UTC"/"GMT"). + starredAt = starredAt.In(time.FixedZone("", 0)) + stargazers := StargazersWrapper{ StargazerWrapper{ Stargazer: Stargazer{ diff --git a/pkg/models/settings.go b/pkg/models/settings.go index 6c06111b..b2cf1bc5 100644 --- a/pkg/models/settings.go +++ b/pkg/models/settings.go @@ -18,29 +18,49 @@ const ( type Settings struct { // General settings - GitHubURL string `json:"githubUrl,omitempty"` + GitHubURL string `json:"githubUrl,omitempty"` + // GitHubPlan: Not used in the backend. Adding here for frontend parity + GitHubPlan string `json:"githubPlan,omitempty"` CachingEnabled bool `json:"cachingEnabled,omitempty"` // Auth type related settings SelectedAuthType AuthType `json:"selectedAuthType,omitempty"` // personal-access-token auth related settings AccessToken string // github-app auth related settings - AppId json.RawMessage `json:"appId,omitempty"` + AppId string `json:"appId,omitempty"` // legacy config and provisioning, appId is stored as either number or string. But string should be desired format. So custom UnmarshalJSON function added to support this AppIdInt64 int64 - InstallationId json.RawMessage `json:"installationId,omitempty"` + InstallationId string `json:"installationId,omitempty"` // legacy config and provisioning, appId is stored as either number or string. But string should be desired format. So custom UnmarshalJSON function added to support this InstallationIdInt64 int64 PrivateKey string } +// UnmarshalJSON decodes the settings while tolerating the appId and installationId +// fields being stored either as JSON strings (e.g. "1111") or, for legacy configs, +// as JSON numbers (e.g. 1111). Both are normalized to their string representation. +func (s *Settings) UnmarshalJSON(data []byte) error { + type Alias Settings + aux := struct { + AppId json.RawMessage `json:"appId,omitempty"` + InstallationId json.RawMessage `json:"installationId,omitempty"` + *Alias + }{Alias: (*Alias)(s)} + if err := json.Unmarshal(data, &aux); err != nil { + return err + } + s.AppId = rawMessageToString(aux.AppId) + s.InstallationId = rawMessageToString(aux.InstallationId) + return nil +} + func LoadSettings(settings backend.DataSourceInstanceSettings) (s Settings, err error) { if err := json.Unmarshal(settings.JSONData, &s); err != nil { return s, err } if s.SelectedAuthType == AuthTypeGithubApp { - if s.AppIdInt64, err = rawMessageToInt64(s.AppId, "app id"); err != nil { + if s.AppIdInt64, err = stringToInt64(s.AppId, "app id"); err != nil { return s, err } - if s.InstallationIdInt64, err = rawMessageToInt64(s.InstallationId, "installation id"); err != nil { + if s.InstallationIdInt64, err = stringToInt64(s.InstallationId, "installation id"); err != nil { return s, err } if val, ok := settings.DecryptedSecureJSONData["privateKey"]; ok { @@ -58,8 +78,12 @@ func LoadSettings(settings backend.DataSourceInstanceSettings) (s Settings, err return s, nil } -func rawMessageToInt64(r json.RawMessage, m string) (out int64, err error) { - out, err = strconv.ParseInt(strings.ReplaceAll(string(r), `"`, ""), 10, 64) +func rawMessageToString(r json.RawMessage) string { + return strings.Trim(string(r), `"`) +} + +func stringToInt64(v string, m string) (out int64, err error) { + out, err = strconv.ParseInt(v, 10, 64) if err != nil { return 0, fmt.Errorf("error parsing %s", m) } diff --git a/pkg/models/settings_test.go b/pkg/models/settings_test.go index 8e063b99..614a46e7 100644 --- a/pkg/models/settings_test.go +++ b/pkg/models/settings_test.go @@ -44,9 +44,9 @@ func TestLoadSettings(t *testing.T) { want: models.Settings{ GitHubURL: "https://foo.com", SelectedAuthType: models.AuthTypeGithubApp, - AppId: []byte(`"1111"`), + AppId: "1111", AppIdInt64: 1111, - InstallationId: []byte(`"2222"`), + InstallationId: "2222", InstallationIdInt64: 2222, PrivateKey: "foo", }, @@ -63,9 +63,9 @@ func TestLoadSettings(t *testing.T) { want: models.Settings{ GitHubURL: "https://foo.com", SelectedAuthType: models.AuthTypeGithubApp, - AppId: []byte(`1111`), + AppId: "1111", AppIdInt64: 1111, - InstallationId: []byte(`2222`), + InstallationId: "2222", InstallationIdInt64: 2222, PrivateKey: "foo", }, diff --git a/pkg/schema/dsconfig.json b/pkg/schema/dsconfig.json new file mode 100644 index 00000000..b256fc27 --- /dev/null +++ b/pkg/schema/dsconfig.json @@ -0,0 +1,152 @@ +{ + "$schema": "https://raw.githubusercontent.com/grafana/dsconfig/refs/heads/main/dsconfig/schema.json", + "schemaVersion": "v1", + "pluginType": "grafana-github-datasource", + "pluginName": "GitHub", + "fields": [ + { + "id": "jsonData.selectedAuthType", + "key": "selectedAuthType", + "label": "Authentication Type", + "description": "GitHub authentication method.", + "valueType": "string", + "target": "jsonData", + "defaultValue": "personal-access-token", + "validations": [ + { + "type": "allowedValues", + "values": [ + "personal-access-token", + "github-app" + ] + } + ], + "ui": { + "component": "select", + "options": [ + { + "label": "Personal Access Token", + "value": "personal-access-token" + }, + { + "label": "GitHub App", + "value": "github-app" + } + ] + } + }, + { + "id": "jsonData.githubPlan", + "key": "githubPlan", + "label": "GitHub Plan", + "description": "GitHub license type.", + "valueType": "string", + "target": "jsonData", + "validations": [ + { + "type": "allowedValues", + "values": [ + "github-basic", + "github-enterprise-cloud", + "github-enterprise-server" + ] + } + ], + "ui": { + "component": "select", + "options": [ + { + "label": "GitHub Basic", + "value": "github-basic" + }, + { + "label": "Enterprise Cloud", + "value": "github-enterprise-cloud" + }, + { + "label": "Enterprise Server", + "value": "github-enterprise-server" + } + ] + } + }, + { + "id": "jsonData.githubUrl", + "key": "githubUrl", + "label": "GitHub URL", + "description": "GitHub Enterprise Server URL. Leave empty for github.com.", + "valueType": "string", + "target": "jsonData", + "dependsOn": "jsonData.githubPlan == 'github-enterprise-server'" + }, + { + "id": "jsonData.appId", + "key": "appId", + "label": "App ID", + "description": "GitHub App ID.", + "valueType": "string", + "target": "jsonData", + "dependsOn": "jsonData.selectedAuthType == 'github-app'" + }, + { + "id": "jsonData.installationId", + "key": "installationId", + "label": "Installation ID", + "description": "GitHub App installation ID.", + "valueType": "string", + "target": "jsonData", + "dependsOn": "jsonData.selectedAuthType == 'github-app'" + }, + { + "id": "jsonData.cachingEnabled", + "key": "cachingEnabled", + "label": "Enable caching", + "description": "Enable caching", + "valueType": "boolean", + "target": "jsonData" + }, + { + "id": "secureJsonData.accessToken", + "key": "accessToken", + "label": "Personal Access Token", + "description": "GitHub personal access token.", + "valueType": "string", + "target": "secureJsonData", + "dependsOn": "jsonData.selectedAuthType == 'personal-access-token'" + }, + { + "id": "secureJsonData.privateKey", + "key": "privateKey", + "label": "Private Key", + "description": "GitHub App private key (PEM format).", + "valueType": "string", + "target": "secureJsonData", + "dependsOn": "jsonData.selectedAuthType == 'github-app'", + "ui": { + "component": "textarea", + "rows": 7 + } + } + ], + "groups": [ + { + "id": "auth", + "title": "Authentication", + "fieldRefs": [ + "jsonData.selectedAuthType", + "jsonData.githubPlan", + "jsonData.githubUrl", + "secureJsonData.accessToken" + ] + }, + { + "id": "github-app", + "title": "GitHub App", + "fieldRefs": [ + "jsonData.appId", + "jsonData.installationId", + "secureJsonData.privateKey" + ] + } + ] +} diff --git a/pkg/schema/schema.gen.json b/pkg/schema/schema.gen.json new file mode 100644 index 00000000..2c94490c --- /dev/null +++ b/pkg/schema/schema.gen.json @@ -0,0 +1,62 @@ +{ + "targetApiVersion": "v0alpha1", + "settings": { + "spec": { + "type": "object", + "properties": { + "jsonData": { + "type": "object", + "properties": { + "appId": { + "description": "GitHub App ID.", + "type": "string", + "x-dsconfig-depends-on": "jsonData.selectedAuthType == 'github-app'" + }, + "cachingEnabled": { + "description": "Enable caching", + "type": "boolean" + }, + "githubPlan": { + "description": "GitHub license type.", + "type": "string", + "enum": [ + "github-basic", + "github-enterprise-cloud", + "github-enterprise-server" + ] + }, + "githubUrl": { + "description": "GitHub Enterprise Server URL. Leave empty for github.com.", + "type": "string", + "x-dsconfig-depends-on": "jsonData.githubPlan == 'github-enterprise-server'" + }, + "installationId": { + "description": "GitHub App installation ID.", + "type": "string", + "x-dsconfig-depends-on": "jsonData.selectedAuthType == 'github-app'" + }, + "selectedAuthType": { + "description": "GitHub authentication method.", + "type": "string", + "default": "personal-access-token", + "enum": [ + "personal-access-token", + "github-app" + ] + } + } + } + } + }, + "secureValues": [ + { + "key": "accessToken", + "description": "GitHub personal access token." + }, + { + "key": "privateKey", + "description": "GitHub App private key (PEM format)." + } + ] + } +} diff --git a/pkg/schema/schema.go b/pkg/schema/schema.go new file mode 100644 index 00000000..ffdcd275 --- /dev/null +++ b/pkg/schema/schema.go @@ -0,0 +1,45 @@ +package schema + +import ( + _ "embed" + "encoding/json" + "fmt" + + "github.com/grafana/dsconfig/dsconfig" + dsschema "github.com/grafana/dsconfig/schema" + sdkSchema "github.com/grafana/grafana-plugin-sdk-go/experimental/pluginschema" +) + +const TargetAPIVersion = "v0alpha1" + +//go:embed dsconfig.json +var configSchemaJSON []byte + +func DSConfigSchema() (*dsconfig.Schema, error) { + var s dsconfig.Schema + if err := json.Unmarshal(configSchemaJSON, &s); err != nil { + return nil, fmt.Errorf("parse settings.schema.json: %w", err) + } + return &s, nil +} + +func NewSDKSchema() *sdkSchema.PluginSchema { + cfg, err := DSConfigSchema() + if err != nil { + panic(err) + } + settings, err := cfg.ToPluginSchemaSettings() + if err != nil { + panic(err) + } + var schema *sdkSchema.PluginSchema + schema, err = dsschema.NewPluginSchema(TargetAPIVersion, settings, newSettingsExamples()) + if err != nil { + panic(err) + } + return schema +} + +func newSettingsExamples() *sdkSchema.SettingsExamples { + return &sdkSchema.SettingsExamples{} +} diff --git a/pkg/schema/schema_test.go b/pkg/schema/schema_test.go new file mode 100644 index 00000000..0b63bb1d --- /dev/null +++ b/pkg/schema/schema_test.go @@ -0,0 +1,48 @@ +package schema_test + +import ( + "flag" + "testing" + + dsconfigSchema "github.com/grafana/dsconfig/schema" + "github.com/grafana/github-datasource/pkg/models" + pluginSchema "github.com/grafana/github-datasource/pkg/schema" + "github.com/stretchr/testify/require" +) + +// generateArtifacts is set by `go generateArtifacts ./pkg/schema`, which runs this test package +// with the -generateArtifacts flag to (re)write the committed schema artifacts. When the +// flag is not set, TestGenerateArtifacts is skipped during normal test runs. +var generateArtifacts = flag.Bool("generate", false, "write the schema artifacts to disk instead of running tests") + +//go:generate go test -run TestGenerateArtifacts -generate +func TestGenerateArtifacts(t *testing.T) { + t.Helper() + if !*generateArtifacts { + t.Skip("run via `go generate ./...` to write schema artifacts") + } + err := dsconfigSchema.WriteArtifacts(pluginSchema.NewSDKSchema()) + if err != nil { + t.Error("failed to generate schema artifacts") + } + require.NoError(t, err) + t.Log("schema artifacts generated") +} + +// TestSchemaConformance runs the plugin-agnostic schema guard rails defined in +// the dsconfig SDK against this plugin's schema. The invariants live in +// github.com/grafana/dsconfig/schema/conformance so they can be reused by any +// plugin built on the dsconfig single source of truth. +func TestSchemaConformance(t *testing.T) { + cfg, err := pluginSchema.DSConfigSchema() + require.NoError(t, err) + dsconfigSchema.RunConformanceTests(t, dsconfigSchema.Params{ + PluginID: "grafana-github-datasource", + DSConfigSchema: cfg, + PluginSchema: pluginSchema.NewSDKSchema(), + SettingsJSONModel: models.Settings{}, + SecureKeys: []string{ + "privateKey", "accessToken", + }, + }) +} diff --git a/pkg/schema/settings.examples.gen.json b/pkg/schema/settings.examples.gen.json new file mode 100644 index 00000000..6dbaba03 --- /dev/null +++ b/pkg/schema/settings.examples.gen.json @@ -0,0 +1,3 @@ +{ + "examples": null +} diff --git a/pkg/schema/settings.gen.json b/pkg/schema/settings.gen.json new file mode 100644 index 00000000..ae2ece17 --- /dev/null +++ b/pkg/schema/settings.gen.json @@ -0,0 +1,59 @@ +{ + "spec": { + "type": "object", + "properties": { + "jsonData": { + "type": "object", + "properties": { + "appId": { + "description": "GitHub App ID.", + "type": "string", + "x-dsconfig-depends-on": "jsonData.selectedAuthType == 'github-app'" + }, + "cachingEnabled": { + "description": "Enable caching", + "type": "boolean" + }, + "githubPlan": { + "description": "GitHub license type.", + "type": "string", + "enum": [ + "github-basic", + "github-enterprise-cloud", + "github-enterprise-server" + ] + }, + "githubUrl": { + "description": "GitHub Enterprise Server URL. Leave empty for github.com.", + "type": "string", + "x-dsconfig-depends-on": "jsonData.githubPlan == 'github-enterprise-server'" + }, + "installationId": { + "description": "GitHub App installation ID.", + "type": "string", + "x-dsconfig-depends-on": "jsonData.selectedAuthType == 'github-app'" + }, + "selectedAuthType": { + "description": "GitHub authentication method.", + "type": "string", + "default": "personal-access-token", + "enum": [ + "personal-access-token", + "github-app" + ] + } + } + } + } + }, + "secureValues": [ + { + "key": "accessToken", + "description": "GitHub personal access token." + }, + { + "key": "privateKey", + "description": "GitHub App private key (PEM format)." + } + ] +} diff --git a/webpack.config.ts b/webpack.config.ts new file mode 100644 index 00000000..b11b1542 --- /dev/null +++ b/webpack.config.ts @@ -0,0 +1,41 @@ +import type { Configuration } from 'webpack'; +import { merge } from 'webpack-merge'; +import CopyWebpackPlugin from 'copy-webpack-plugin'; +import grafanaConfig, { Env } from './.config/webpack/webpack.config'; + +const config = async (env: Env): Promise => { + const baseConfig = await grafanaConfig(env); + return merge(baseConfig, { + plugins: [new CopyWebpackPlugin({ + patterns: [ + { + from: '../skills/**/*', + to: './skills', + noErrorOnMissing: true + }, + { + from: '../pkg/schema/dsconfig.json', + to: './schema/settings.schema.json', + noErrorOnMissing: true + }, + { + from: '../pkg/schema/schema.gen.json', + to: './schema/v0alpha1.json', + noErrorOnMissing: true + }, + { + from: '../pkg/schema/settings.gen.json', + to: './schema/v0alpha1/settings.json', + noErrorOnMissing: true + }, + { + from: '../pkg/schema/settings.examples.gen.json', + to: './schema/v0alpha1/settings.examples.json', + noErrorOnMissing: true + }, + ] + })], + }); +}; + +export default config; From 8e8a1ed32d102bf946e5bf1b7c8587334a6a0da0 Mon Sep 17 00:00:00 2001 From: yesoreyeram <153843+yesoreyeram@users.noreply.github.com> Date: Fri, 19 Jun 2026 11:05:28 +0100 Subject: [PATCH 2/5] updated version and changelog --- CHANGELOG.md | 24 +++++++++++++++--------- package.json | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d91b6ec..13af0649 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 2.8.2 + +⚙️ Chore: Added plugin schema and artifacts + +⚙️ Chore: Refactored the appId and installationId parsing to support legacy configuration + ## 2.8.1 ⚙️ Updating experimental schemas. @@ -8,15 +14,14 @@ ## 2.8.0 -### Minor Changes - 🚀 Add additional commit types that enable users to query for file changes alongside pull request or commit queries -🚀 minimum required Grafana version is now set to 11.6.7 -### Patch Changes +🚀 minimum required Grafana version is now set to 11.6.7 🐛 Updated query editor to use EditorField component for consistency with other plugins + 🐛 Migrated select component to combobox + 🐛 Chore: strict query type options ## 2.7.2 @@ -48,21 +53,19 @@ ## 2.5.0 🚀 Update dependencies for react-19 upgrade preparations + 🚀 Feature: Add labels to Pull Requests query type ## 2.4.1 🐛 Update create-plugin configs + 🐛 Fixed the broken E2E tests with updated plugin-e2e package ## 2.4.0 -### Minor Changes - 🚀 Add support for PDC -### Patch Changes - 🐛 Fix empty results in Workflows query type. Added nil check for CreatedAt/UpdatedAt timestamps and added "None" option to Time Field dropdown (default) to return all workflows without time filtering. ## 2.3.0 @@ -79,7 +82,7 @@ ⚙️ Add alternate "rate limit exceeded" error handling (#494) -🐛 Remove from readme (#497) +🐛 Remove `` from readme (#497) ⚙️ Bump @grafana/create-plugin configuration to 5.25.8 (#496) @@ -90,8 +93,11 @@ ## 2.1.6 🐛 Documentation links will open in a new tab + 🐛 Removed unused annotations method (replaced with new annotations support in [#196](https://github.com/grafana/github-datasource/pull/196)) + 🐛 Fixes error parsing app id / client id through provisioning via environment variables. Fixes [#477](https://github.com/grafana/github-datasource/issues/477) + 🐛 Replaced the deprecated `setVariableQueryEditor` with `CustomVariableSupport` ## 2.1.5 diff --git a/package.json b/package.json index d07cb0b5..d23dd4d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grafana-github-datasource", - "version": "2.8.1", + "version": "2.8.2", "private": true, "description": "Grafana data source plugin for Github", "repository": "github:grafana/github-datasource", From 219c0a02ee376b428f257f717cfe57ecbda67595 Mon Sep 17 00:00:00 2001 From: Sriram <153843+yesoreyeram@users.noreply.github.com> Date: Fri, 19 Jun 2026 11:11:52 +0100 Subject: [PATCH 3/5] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- pkg/schema/schema.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/schema/schema.go b/pkg/schema/schema.go index ffdcd275..568d2a67 100644 --- a/pkg/schema/schema.go +++ b/pkg/schema/schema.go @@ -18,7 +18,7 @@ var configSchemaJSON []byte func DSConfigSchema() (*dsconfig.Schema, error) { var s dsconfig.Schema if err := json.Unmarshal(configSchemaJSON, &s); err != nil { - return nil, fmt.Errorf("parse settings.schema.json: %w", err) + return nil, fmt.Errorf("parse dsconfig.json: %w", err) } return &s, nil } From 5ff9b019a921f209217aea313a82e404759192d5 Mon Sep 17 00:00:00 2001 From: Sriram <153843+yesoreyeram@users.noreply.github.com> Date: Fri, 19 Jun 2026 11:12:34 +0100 Subject: [PATCH 4/5] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- pkg/schema/schema_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/schema/schema_test.go b/pkg/schema/schema_test.go index 0b63bb1d..c331d78c 100644 --- a/pkg/schema/schema_test.go +++ b/pkg/schema/schema_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/require" ) -// generateArtifacts is set by `go generateArtifacts ./pkg/schema`, which runs this test package -// with the -generateArtifacts flag to (re)write the committed schema artifacts. When the +// generateArtifacts is set by `go generate ./pkg/schema`, which runs this test package +// with the -generate flag to (re)write the committed schema artifacts. When the // flag is not set, TestGenerateArtifacts is skipped during normal test runs. var generateArtifacts = flag.Bool("generate", false, "write the schema artifacts to disk instead of running tests") From 70c0ac3682d0c5b6cf70066128b56ffbc46cc95c Mon Sep 17 00:00:00 2001 From: yesoreyeram <153843+yesoreyeram@users.noreply.github.com> Date: Fri, 19 Jun 2026 11:15:37 +0100 Subject: [PATCH 5/5] addressed review comments --- pkg/models/settings.go | 2 +- pkg/schema/schema_test.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/models/settings.go b/pkg/models/settings.go index b2cf1bc5..f71d3ab7 100644 --- a/pkg/models/settings.go +++ b/pkg/models/settings.go @@ -29,7 +29,7 @@ type Settings struct { // github-app auth related settings AppId string `json:"appId,omitempty"` // legacy config and provisioning, appId is stored as either number or string. But string should be desired format. So custom UnmarshalJSON function added to support this AppIdInt64 int64 - InstallationId string `json:"installationId,omitempty"` // legacy config and provisioning, appId is stored as either number or string. But string should be desired format. So custom UnmarshalJSON function added to support this + InstallationId string `json:"installationId,omitempty"` // legacy config and provisioning: installationId may be stored as either number or string; UnmarshalJSON normalizes it to a string InstallationIdInt64 int64 PrivateKey string } diff --git a/pkg/schema/schema_test.go b/pkg/schema/schema_test.go index c331d78c..272b3420 100644 --- a/pkg/schema/schema_test.go +++ b/pkg/schema/schema_test.go @@ -11,11 +11,11 @@ import ( ) // generateArtifacts is set by `go generate ./pkg/schema`, which runs this test package -// with the -generate flag to (re)write the committed schema artifacts. When the +// with the -generateArtifacts flag to (re)write the committed schema artifacts. When the // flag is not set, TestGenerateArtifacts is skipped during normal test runs. -var generateArtifacts = flag.Bool("generate", false, "write the schema artifacts to disk instead of running tests") +var generateArtifacts = flag.Bool("generateArtifacts", false, "write the schema artifacts to disk instead of running tests") -//go:generate go test -run TestGenerateArtifacts -generate +//go:generate go test -run TestGenerateArtifacts -generateArtifacts func TestGenerateArtifacts(t *testing.T) { t.Helper() if !*generateArtifacts {