Chore: Update thema and cuesty v0.1.6 (#63629)

* Update thema and cuesty

* Update thema version

* Update thema again

* update thema

---------

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
This commit is contained in:
Selene 2023-03-01 06:23:57 +01:00 committed by GitHub
parent ac5dbf2632
commit e1350a905f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 57 additions and 55 deletions

4
go.mod
View File

@ -67,7 +67,7 @@ require (
github.com/google/wire v0.5.0
github.com/gorilla/websocket v1.5.0
github.com/grafana/alerting v0.0.0-20230203015918-0e4e2675d7aa
github.com/grafana/cuetsy v0.1.5
github.com/grafana/cuetsy v0.1.6
github.com/grafana/grafana-aws-sdk v0.12.0
github.com/grafana/grafana-azure-sdk-go v1.6.0
github.com/grafana/grafana-plugin-sdk-go v0.149.1
@ -271,7 +271,7 @@ require (
buf.build/gen/go/parca-dev/parca/protocolbuffers/go v1.28.1-20221222094228-8b1d3d0f62e6.4
github.com/Masterminds/semver/v3 v3.1.1
github.com/dave/dst v0.27.2
github.com/grafana/thema v0.0.0-20230221105543-a6a177d234d7
github.com/grafana/thema v0.0.0-20230224141623-cb20887cb028
github.com/hmarr/codeowners v1.1.1
github.com/weaveworks/common v0.0.0-20230208133027-16871410fca4
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f

10
go.sum
View File

@ -1259,8 +1259,8 @@ github.com/grafana/alerting v0.0.0-20230203015918-0e4e2675d7aa h1:ue2fctL9LHJWYw
github.com/grafana/alerting v0.0.0-20230203015918-0e4e2675d7aa/go.mod h1:NoSLbfmUwE+omWFReFrLtbtOItmvTbuQERJ6XFYp9ME=
github.com/grafana/codejen v0.0.3 h1:tAWxoTUuhgmEqxJPOLtJoxlPBbMULFwKFOcRsPRPXDw=
github.com/grafana/codejen v0.0.3/go.mod h1:zmwwM/DRyQB7pfuBjTWII3CWtxcXh8LTwAYGfDfpR6s=
github.com/grafana/cuetsy v0.1.5 h1:mnFwAXdbqCsyL8r7kkdUMJ4kOAR26cxIPmrZj7JzTeY=
github.com/grafana/cuetsy v0.1.5/go.mod h1:4KWkUOslwvRTpEv7wdQG0jDFTuJmU+0L9x0h4kWxa2A=
github.com/grafana/cuetsy v0.1.6 h1:61QGIDy1rVABU3OkoarOn0+qPdGopIJr34PyWVmGDfs=
github.com/grafana/cuetsy v0.1.6/go.mod h1:4KWkUOslwvRTpEv7wdQG0jDFTuJmU+0L9x0h4kWxa2A=
github.com/grafana/dskit v0.0.0-20230202092222-880a7f8141cc h1:lQFgXpsZNDdi0whUROW15r/akzLIdXAn6xr5vqlZucI=
github.com/grafana/dskit v0.0.0-20230202092222-880a7f8141cc/go.mod h1:ulYLLoSd71AWIjxgifLO86Lndx82Yj+IcV+fFnh8tkI=
github.com/grafana/go-mssqldb v0.0.0-20210326084033-d0ce3c521036 h1:GplhUk6Xes5JIhUUrggPcPBhOn+eT8+WsHiebvq7GgA=
@ -1283,8 +1283,10 @@ github.com/grafana/saml v0.4.13-0.20230203140620-5f476db5c00a h1:aWSTt/pTOI4uGY9
github.com/grafana/saml v0.4.13-0.20230203140620-5f476db5c00a/go.mod h1:igEejV+fihTIlHXYP8zOec3V5A8y3lws5bQBFsTm4gA=
github.com/grafana/sqlds/v2 v2.3.10 h1:HWKhE0vR6LoEiE+Is8CSZOgaB//D1yqb2ntkass9Fd4=
github.com/grafana/sqlds/v2 v2.3.10/go.mod h1:c6ibxnxRVGxV/0YkEgvy7QpQH/lyifFyV7K/14xvdIs=
github.com/grafana/thema v0.0.0-20230221105543-a6a177d234d7 h1:qTb0okVkF2FIpFd9WWjiKkH3+tnQBsee5fSt3d6Q6Ak=
github.com/grafana/thema v0.0.0-20230221105543-a6a177d234d7/go.mod h1:PnyQW9mxG+0JLU+sVuyWoVustAY0WtMJEM0fl/ms8IA=
github.com/grafana/thema v0.0.0-20230223160728-4226e958935a h1:5DSEQFi/pr7pYokTEvhVe94n5s6p771+PKD/GjaoP+s=
github.com/grafana/thema v0.0.0-20230223160728-4226e958935a/go.mod h1:T6q1RVzq5fzVbm+QBeIsTmVzuXlMaArp4wxfLvcaMV0=
github.com/grafana/thema v0.0.0-20230224141623-cb20887cb028 h1:6DXb3CmghXpjtd0VjK1FDEjvHhNcXfYSxUcEfxyMx9w=
github.com/grafana/thema v0.0.0-20230224141623-cb20887cb028/go.mod h1:T6q1RVzq5fzVbm+QBeIsTmVzuXlMaArp4wxfLvcaMV0=
github.com/grafana/xorm v0.8.3-0.20220614223926-2fcda7565af6 h1:I9dh1MXGX0wGyxdV/Sl7+ugnki4Dfsy8lv2s5Yf887o=
github.com/grafana/xorm v0.8.3-0.20220614223926-2fcda7565af6/go.mod h1:ZkJLEYLoVyg7amJK/5r779bHyzs2AU8f8VMiP6BM7uY=
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=

View File

@ -359,7 +359,7 @@ type AzureMonitorQuery struct {
Datasource *interface{} `json:"datasource,omitempty"`
// @deprecated Legacy template variable support.
GrafanaTemplateVariableFn *AzureMonitorQuery_GrafanaTemplateVariableFn `json:"grafanaTemplateVariableFn,omitempty"`
GrafanaTemplateVariableFn *AzureMonitorQueryGrafanaTemplateVariableFn `json:"grafanaTemplateVariableFn,omitempty"`
// Hide true if query is disabled (ie should not be returned to the dashboard)
Hide *bool `json:"hide,omitempty"`
@ -394,7 +394,7 @@ type AzureMonitorQuery struct {
type AzureMonitorQueryAzureLogAnalyticsResultFormat string
// @deprecated Legacy template variable support.
type AzureMonitorQuery_GrafanaTemplateVariableFn struct {
type AzureMonitorQueryGrafanaTemplateVariableFn struct {
Kind *interface{} `json:"kind,omitempty"`
MetricName *string `json:"metricName,omitempty"`
MetricNamespace *string `json:"metricNamespace,omitempty"`

View File

@ -307,7 +307,7 @@ type CloudWatchMetricsQuery struct {
QueryMode *CloudWatchMetricsQueryQueryMode `json:"queryMode,omitempty"`
Region string `json:"region"`
Sql *struct {
From *CloudWatchMetricsQuery_Sql_From `json:"from,omitempty"`
From *CloudWatchMetricsQuerySqlFrom `json:"from,omitempty"`
GroupBy *struct {
// TODO should be QueryEditorExpression[] | QueryEditorArrayExpression[], extend in veneer
Expressions interface{} `json:"expressions"`
@ -363,8 +363,8 @@ type CloudWatchMetricsQuerySqlFromParametersType string
// CloudWatchMetricsQuerySqlFromPropertyType defines model for CloudWatchMetricsQuery.Sql.From.Property.Type.
type CloudWatchMetricsQuerySqlFromPropertyType string
// CloudWatchMetricsQuery_Sql_From defines model for CloudWatchMetricsQuery.Sql.From.
type CloudWatchMetricsQuery_Sql_From struct {
// CloudWatchMetricsQuerySqlFrom defines model for CloudWatchMetricsQuery.Sql.From.
type CloudWatchMetricsQuerySqlFrom struct {
Name *string `json:"name,omitempty"`
Parameters []struct {
Name *string `json:"name,omitempty"`
@ -538,7 +538,7 @@ type QueryEditorPropertyExpressionType string
// SQLExpression defines model for SQLExpression.
type SQLExpression struct {
From *SQLExpression_From `json:"from,omitempty"`
From *SQLExpressionFrom `json:"from,omitempty"`
GroupBy *struct {
// TODO should be QueryEditorExpression[] | QueryEditorArrayExpression[], extend in veneer
Expressions interface{} `json:"expressions"`
@ -579,8 +579,8 @@ type SQLExpressionFromParametersType string
// SQLExpressionFromPropertyType defines model for SQLExpression.From.Property.Type.
type SQLExpressionFromPropertyType string
// SQLExpression_From defines model for SQLExpression.From.
type SQLExpression_From struct {
// SQLExpressionFrom defines model for SQLExpression.From.
type SQLExpressionFrom struct {
Name *string `json:"name,omitempty"`
Parameters []struct {
Name *string `json:"name,omitempty"`

View File

@ -498,18 +498,18 @@ type BasePipelineMetricAggregationType string
// BucketAggregation defines model for BucketAggregation.
type BucketAggregation struct {
Field *string `json:"field,omitempty"`
Id *string `json:"id,omitempty"`
Settings *BucketAggregation_Settings `json:"settings,omitempty"`
Type *interface{} `json:"type,omitempty"`
Field *string `json:"field,omitempty"`
Id *string `json:"id,omitempty"`
Settings *BucketAggregationSettings `json:"settings,omitempty"`
Type *interface{} `json:"type,omitempty"`
union json.RawMessage
}
// BucketAggregationSettingsOrder defines model for BucketAggregation.Settings.Order.
type BucketAggregationSettingsOrder string
// BucketAggregation_Settings defines model for BucketAggregation.Settings.
type BucketAggregation_Settings struct {
// BucketAggregationSettings defines model for BucketAggregation.Settings.
type BucketAggregationSettings struct {
Filters []struct {
Label string `json:"label"`
Query string `json:"query"`
@ -630,7 +630,7 @@ type ElasticsearchDataQuery struct {
Alias *string `json:"alias,omitempty"`
// List of bucket aggregations
BucketAggs []_BucketAggs_Item `json:"bucketAggs,omitempty"`
BucketAggs []BucketAggsItem `json:"bucketAggs,omitempty"`
// For mixed data sources the selected datasource is on the query level.
// For non mixed scenarios this is undefined.
@ -645,7 +645,7 @@ type ElasticsearchDataQuery struct {
Key *string `json:"key,omitempty"`
// List of metric aggregations
Metrics []_Metrics_Item `json:"metrics,omitempty"`
Metrics []MetricsItem `json:"metrics,omitempty"`
// Lucene query
Query *string `json:"query,omitempty"`
@ -664,8 +664,8 @@ type ElasticsearchDataQuery struct {
// BucketAggsSettingsOrder defines model for ElasticsearchDataQuery.BucketAggs.Settings.Order.
type BucketAggsSettingsOrder string
// _BucketAggs_Settings defines model for ElasticsearchDataQuery.BucketAggs.Settings.
type _BucketAggs_Settings struct {
// BucketAggsSettings defines model for ElasticsearchDataQuery.BucketAggs.Settings.
type BucketAggsSettings struct {
Filters []struct {
Label string `json:"label"`
Query string `json:"query"`
@ -683,17 +683,17 @@ type _BucketAggs_Settings struct {
AdditionalProperties map[string]interface{} `json:"-"`
}
// _BucketAggs_Item defines model for ElasticsearchDataQuery.bucketAggs.Item.
type _BucketAggs_Item struct {
Field *string `json:"field,omitempty"`
Id *string `json:"id,omitempty"`
Settings *_BucketAggs_Settings `json:"settings,omitempty"`
Type *interface{} `json:"type,omitempty"`
// BucketAggsItem defines model for ElasticsearchDataQuery.bucketAggs.Item.
type BucketAggsItem struct {
Field *string `json:"field,omitempty"`
Id *string `json:"id,omitempty"`
Settings *BucketAggsSettings `json:"settings,omitempty"`
Type *interface{} `json:"type,omitempty"`
union json.RawMessage
}
// _Metrics_Settings defines model for ElasticsearchDataQuery.Metrics.Settings.
type _Metrics_Settings struct {
// MetricsSettings defines model for ElasticsearchDataQuery.Metrics.Settings.
type MetricsSettings struct {
Format *string `json:"format,omitempty"`
Lag *string `json:"lag,omitempty"`
Limit *string `json:"limit,omitempty"`
@ -713,8 +713,8 @@ type _Metrics_Settings struct {
AdditionalProperties map[string]interface{} `json:"-"`
}
// _Metrics_Item defines model for ElasticsearchDataQuery.metrics.Item.
type _Metrics_Item struct {
// MetricsItem defines model for ElasticsearchDataQuery.metrics.Item.
type MetricsItem struct {
Field *string `json:"field,omitempty"`
Hide *bool `json:"hide,omitempty"`
Id *string `json:"id,omitempty"`
@ -724,8 +724,8 @@ type _Metrics_Item struct {
Name string `json:"name"`
PipelineAgg string `json:"pipelineAgg"`
} `json:"pipelineVariables,omitempty"`
Settings *_Metrics_Settings `json:"settings,omitempty"`
Type *interface{} `json:"type,omitempty"`
Settings *MetricsSettings `json:"settings,omitempty"`
Type *interface{} `json:"type,omitempty"`
union json.RawMessage
}
@ -864,13 +864,13 @@ type MetricAggregation struct {
Name string `json:"name"`
PipelineAgg string `json:"pipelineAgg"`
} `json:"pipelineVariables,omitempty"`
Settings *MetricAggregation_Settings `json:"settings,omitempty"`
Type *interface{} `json:"type,omitempty"`
Settings *MetricAggregationSettings `json:"settings,omitempty"`
Type *interface{} `json:"type,omitempty"`
union json.RawMessage
}
// MetricAggregation_Settings defines model for MetricAggregation.Settings.
type MetricAggregation_Settings struct {
// MetricAggregationSettings defines model for MetricAggregation.Settings.
type MetricAggregationSettings struct {
Format *string `json:"format,omitempty"`
Lag *string `json:"lag,omitempty"`
Limit *string `json:"limit,omitempty"`
@ -941,13 +941,13 @@ type MetricAggregationWithSettings struct {
Name string `json:"name"`
PipelineAgg string `json:"pipelineAgg"`
} `json:"pipelineVariables,omitempty"`
Settings *MetricAggregationWithSettings_Settings `json:"settings,omitempty"`
Type *interface{} `json:"type,omitempty"`
Settings *MetricAggregationWithSettingsSettings `json:"settings,omitempty"`
Type *interface{} `json:"type,omitempty"`
union json.RawMessage
}
// MetricAggregationWithSettings_Settings defines model for MetricAggregationWithSettings.Settings.
type MetricAggregationWithSettings_Settings struct {
// MetricAggregationWithSettingsSettings defines model for MetricAggregationWithSettings.Settings.
type MetricAggregationWithSettingsSettings struct {
Format *string `json:"format,omitempty"`
Lag *string `json:"lag,omitempty"`
Limit *string `json:"limit,omitempty"`
@ -1128,13 +1128,13 @@ type PipelineMetricAggregation struct {
Name string `json:"name"`
PipelineAgg string `json:"pipelineAgg"`
} `json:"pipelineVariables,omitempty"`
Settings *PipelineMetricAggregation_Settings `json:"settings,omitempty"`
Type *interface{} `json:"type,omitempty"`
Settings *PipelineMetricAggregationSettings `json:"settings,omitempty"`
Type *interface{} `json:"type,omitempty"`
union json.RawMessage
}
// PipelineMetricAggregation_Settings defines model for PipelineMetricAggregation.Settings.
type PipelineMetricAggregation_Settings struct {
// PipelineMetricAggregationSettings defines model for PipelineMetricAggregation.Settings.
type PipelineMetricAggregationSettings struct {
Format *string `json:"format,omitempty"`
Script *interface{} `json:"script,omitempty"`
Unit *string `json:"unit,omitempty"`

View File

@ -364,7 +364,7 @@ composableKinds: DataQuery: {
// #MovingAverage's settings are overridden in types.ts
#MovingAverage: {
#BasePipelineMetricAggregation
type: "moving_avg"
type: #PipelineMetricAggregationType & "moving_avg"
settings?: {...}
} @cuetsy(kind="interface")

View File

@ -134,7 +134,7 @@ export interface Count extends BaseMetricAggregation {
export interface Average extends MetricAggregationWithField, MetricAggregationWithMissingSupport, MetricAggregationWithInlineScript {
field?: string;
settings?: {
script?: (InlineScript | InlineScript);
script?: InlineScript;
missing?: string;
};
type: 'avg';
@ -143,7 +143,7 @@ export interface Average extends MetricAggregationWithField, MetricAggregationWi
export interface Sum extends MetricAggregationWithField, MetricAggregationWithInlineScript {
field?: string;
settings?: {
script?: (InlineScript | InlineScript);
script?: InlineScript;
missing?: string;
};
type: 'sum';
@ -152,7 +152,7 @@ export interface Sum extends MetricAggregationWithField, MetricAggregationWithIn
export interface Max extends MetricAggregationWithField, MetricAggregationWithInlineScript {
field?: string;
settings?: {
script?: (InlineScript | InlineScript);
script?: InlineScript;
missing?: string;
};
type: 'max';
@ -161,7 +161,7 @@ export interface Max extends MetricAggregationWithField, MetricAggregationWithIn
export interface Min extends MetricAggregationWithField, MetricAggregationWithInlineScript {
field?: string;
settings?: {
script?: (InlineScript | InlineScript);
script?: InlineScript;
missing?: string;
};
type: 'min';
@ -178,7 +178,7 @@ export interface ExtendedStats extends MetricAggregationWithField, MetricAggrega
field?: string;
meta?: Record<string, unknown>;
settings?: {
script?: (InlineScript | InlineScript);
script?: InlineScript;
missing?: string;
sigma?: string;
};
@ -188,7 +188,7 @@ export interface ExtendedStats extends MetricAggregationWithField, MetricAggrega
export interface Percentiles extends MetricAggregationWithField, MetricAggregationWithInlineScript {
field?: string;
settings?: {
script?: (InlineScript | InlineScript);
script?: InlineScript;
missing?: string;
percents?: Array<string>;
};