Skip to content

Commit efa16d5

Browse files
authored
v1.1.2 Release (#28)
* go get -u github.com/grafana/grafana-plugin-sdk-go * npx -y @grafana/create-plugin@latest update * SEARCH-8100 Make query timeout configurable (#29) * SEARCH-8103 Include info about scheduled queries in the timeout error (#30) * SEARCH-8309 Allow savedSearchId to be composed using variable(s) (#27) * SEARCH-8309 Allow savedSearchId to be composed using variable(s) * SEARCH-8309 Update QueryEditor to allow typing savedSearchId with ${variable} * SEARCH-8101 Cancel the query upon timeout (#31) * ran "npx -y @grafana/create-plugin@latest update" again * Bumps for v1.1.2
1 parent f87c18a commit efa16d5

16 files changed

+966
-938
lines changed

.config/.cprc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "5.5.1"
2+
"version": "5.11.1"
33
}

.config/.eslintrc

+6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@
2020
"parserOptions": {
2121
"project": "./tsconfig.json"
2222
}
23+
},
24+
{
25+
"files": ["./tests/**/*"],
26+
"rules": {
27+
"react-hooks/rules-of-hooks": "off"
28+
}
2329
}
2430
]
2531
}
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import * as webpack from 'webpack';
2+
3+
const PLUGIN_NAME = 'BuildModeWebpack';
4+
5+
export class BuildModeWebpackPlugin {
6+
apply(compiler: webpack.Compiler) {
7+
compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
8+
compilation.hooks.processAssets.tap(
9+
{
10+
name: PLUGIN_NAME,
11+
stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ADDITIONS,
12+
},
13+
async () => {
14+
const assets = compilation.getAssets();
15+
for (const asset of assets) {
16+
if (asset.name.endsWith('plugin.json')) {
17+
const pluginJsonString = asset.source.source().toString();
18+
const pluginJsonWithBuildMode = JSON.stringify(
19+
{
20+
...JSON.parse(pluginJsonString),
21+
buildMode: compilation.options.mode,
22+
},
23+
null,
24+
4
25+
);
26+
compilation.updateAsset(asset.name, new webpack.sources.RawSource(pluginJsonWithBuildMode));
27+
}
28+
}
29+
}
30+
);
31+
});
32+
}
33+
}

.config/webpack/webpack.config.ts

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { type Configuration, BannerPlugin } from 'webpack';
1616
import LiveReloadPlugin from 'webpack-livereload-plugin';
1717
import VirtualModulesPlugin from 'webpack-virtual-modules';
1818

19+
import { BuildModeWebpackPlugin } from './BuildModeWebpackPlugin';
1920
import { DIST_DIR, SOURCE_DIR } from './constants';
2021
import { getCPConfigVersion, getEntries, getPackageJson, getPluginJson, hasReadme, isWSL } from './utils';
2122

@@ -185,6 +186,7 @@ const config = async (env): Promise<Configuration> => {
185186
},
186187

187188
plugins: [
189+
new BuildModeWebpackPlugin(),
188190
virtualPublicPath,
189191
// Insert create plugin version information into the bundle
190192
new BannerPlugin({

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,10 @@ Initial release. Provides basic data source functionality of fetching saved/sch
1313

1414
- Remove unnecessary logic from CheckHealth
1515
- Properly close HTTP response body in all cases
16+
17+
## 1.1.2
18+
19+
- Query timeout is now configurable.
20+
- Add info & doc link to the timeout error message to encourage the user to leverage scheduled search.
21+
- Upon timeout, cancel the query on the Cribl Search side.
22+
- Allow saved search ID to be composed using dashboard `${variables}`.

go.mod

+35-32
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
11
module github.com/criblcloud/search-datasource
22

3-
go 1.21
3+
go 1.22
44

5-
require github.com/grafana/grafana-plugin-sdk-go v0.252.0
5+
toolchain go1.23.1
66

77
require (
8-
github.com/BurntSushi/toml v1.3.2 // indirect
8+
github.com/golang-jwt/jwt/v5 v5.2.1
9+
github.com/grafana/grafana-plugin-sdk-go v0.260.1
10+
github.com/prometheus/client_golang v1.20.5
11+
github.com/stretchr/testify v1.10.0
12+
)
13+
14+
require (
15+
github.com/BurntSushi/toml v1.4.0 // indirect
916
github.com/apache/arrow/go/v15 v15.0.2 // indirect
1017
github.com/beorn7/perks v1.0.1 // indirect
1118
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
1219
github.com/cespare/xxhash/v2 v2.3.0 // indirect
1320
github.com/cheekybits/genny v1.0.0 // indirect
1421
github.com/chromedp/cdproto v0.0.0-20220208224320-6efb837e6bc2 // indirect
15-
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
22+
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect
1623
github.com/davecgh/go-spew v1.1.1 // indirect
1724
github.com/elazarl/goproxy v0.0.0-20230731152917-f99041a5c027 // indirect
1825
github.com/fatih/color v1.15.0 // indirect
19-
github.com/getkin/kin-openapi v0.124.0 // indirect
26+
github.com/getkin/kin-openapi v0.128.0 // indirect
2027
github.com/go-logr/logr v1.4.2 // indirect
2128
github.com/go-logr/stdr v1.2.2 // indirect
22-
github.com/go-openapi/jsonpointer v0.20.2 // indirect
23-
github.com/go-openapi/swag v0.22.8 // indirect
29+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
30+
github.com/go-openapi/swag v0.23.0 // indirect
2431
github.com/goccy/go-json v0.10.2 // indirect
2532
github.com/gogo/protobuf v1.3.2 // indirect
26-
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
2733
github.com/golang/protobuf v1.5.4 // indirect
2834
github.com/google/flatbuffers v23.5.26+incompatible // indirect
2935
github.com/google/go-cmp v0.6.0 // indirect
@@ -33,11 +39,11 @@ require (
3339
github.com/grafana/pyroscope-go/godeltaprof v0.1.8 // indirect
3440
github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 // indirect
3541
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 // indirect
36-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
42+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 // indirect
3743
github.com/hashicorp/go-hclog v1.6.3 // indirect
38-
github.com/hashicorp/go-plugin v1.6.1 // indirect
44+
github.com/hashicorp/go-plugin v1.6.2 // indirect
3945
github.com/hashicorp/yamux v0.1.1 // indirect
40-
github.com/invopop/yaml v0.2.0 // indirect
46+
github.com/invopop/yaml v0.3.1 // indirect
4147
github.com/josharian/intern v1.0.0 // indirect
4248
github.com/json-iterator/go v1.1.12 // indirect
4349
github.com/klauspost/compress v1.17.9 // indirect
@@ -48,7 +54,6 @@ require (
4854
github.com/mattn/go-colorable v0.1.13 // indirect
4955
github.com/mattn/go-isatty v0.0.19 // indirect
5056
github.com/mattn/go-runewidth v0.0.9 // indirect
51-
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
5257
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
5358
github.com/modern-go/reflect2 v1.0.2 // indirect
5459
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
@@ -58,39 +63,37 @@ require (
5863
github.com/perimeterx/marshmallow v1.1.5 // indirect
5964
github.com/pierrec/lz4/v4 v4.1.18 // indirect
6065
github.com/pmezard/go-difflib v1.0.0 // indirect
61-
github.com/prometheus/client_golang v1.20.3 // indirect
6266
github.com/prometheus/client_model v0.6.1 // indirect
63-
github.com/prometheus/common v0.55.0 // indirect
67+
github.com/prometheus/common v0.60.1 // indirect
6468
github.com/prometheus/procfs v0.15.1 // indirect
6569
github.com/russross/blackfriday/v2 v2.1.0 // indirect
66-
github.com/stretchr/testify v1.9.0 // indirect
6770
github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8 // indirect
6871
github.com/unknwon/com v1.0.1 // indirect
6972
github.com/unknwon/log v0.0.0-20150304194804-e617c87089d3 // indirect
70-
github.com/urfave/cli v1.22.15 // indirect
73+
github.com/urfave/cli v1.22.16 // indirect
7174
github.com/zeebo/xxh3 v1.0.2 // indirect
72-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect
73-
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.53.0 // indirect
74-
go.opentelemetry.io/contrib/propagators/jaeger v1.29.0 // indirect
75-
go.opentelemetry.io/contrib/samplers/jaegerremote v0.23.0 // indirect
76-
go.opentelemetry.io/otel v1.29.0 // indirect
77-
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 // indirect
78-
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect
79-
go.opentelemetry.io/otel/metric v1.29.0 // indirect
80-
go.opentelemetry.io/otel/sdk v1.29.0 // indirect
81-
go.opentelemetry.io/otel/trace v1.29.0 // indirect
75+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.56.0 // indirect
76+
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.57.0 // indirect
77+
go.opentelemetry.io/contrib/propagators/jaeger v1.32.0 // indirect
78+
go.opentelemetry.io/contrib/samplers/jaegerremote v0.26.0 // indirect
79+
go.opentelemetry.io/otel v1.32.0 // indirect
80+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0 // indirect
81+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.32.0 // indirect
82+
go.opentelemetry.io/otel/metric v1.32.0 // indirect
83+
go.opentelemetry.io/otel/sdk v1.32.0 // indirect
84+
go.opentelemetry.io/otel/trace v1.32.0 // indirect
8285
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
8386
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
8487
golang.org/x/mod v0.17.0 // indirect
85-
golang.org/x/net v0.29.0 // indirect
86-
golang.org/x/sync v0.8.0 // indirect
87-
golang.org/x/sys v0.25.0 // indirect
88-
golang.org/x/text v0.18.0 // indirect
88+
golang.org/x/net v0.31.0 // indirect
89+
golang.org/x/sync v0.9.0 // indirect
90+
golang.org/x/sys v0.27.0 // indirect
91+
golang.org/x/text v0.20.0 // indirect
8992
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
9093
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
9194
google.golang.org/genproto v0.0.0-20210630183607-d20f26d13c79 // indirect
92-
google.golang.org/grpc v1.66.0 // indirect
93-
google.golang.org/protobuf v1.34.2 // indirect
95+
google.golang.org/grpc v1.67.1 // indirect
96+
google.golang.org/protobuf v1.35.2 // indirect
9497
gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect
9598
gopkg.in/yaml.v3 v3.0.1 // indirect
9699
)

0 commit comments

Comments
 (0)