Add Makefile targets for generating dashboard app code and update it to SDK v0.35.0 (#102796)

* Update dashboard app to use app SDK v0.35.0

What

This change updates dashboard app to use app SDK v0.35.0 and adds new
Makefile target for running codegen for all apps, in opt-in manner.
Currently only dashboards app is opted in.

Additionally, this changes dashboard app Makefile to properly install
and update app SDK versions when generating code, with app SDK version
pinned in the Makefile itself.

Why

The upgrade addresses issues with `DeepCopy` methods, while the Makefile
targets ensure that codegen is easy to run and uses reproducible
environments.

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Run make update-workspace

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Fix deepcopy methods

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Re-run CUE codegen to satisfy the CI

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Run make update-workspace

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

* Update to v0.35.1

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>

---------

Signed-off-by: Igor Suleymanov <igor.suleymanov@grafana.com>
This commit is contained in:
Igor Suleymanov
2025-03-26 10:49:52 +02:00
committed by GitHub
parent c158b56eab
commit c68234f7e7
57 changed files with 825 additions and 786 deletions
@@ -163,6 +163,18 @@ func NewQueryEditorFunctionExpression() *QueryEditorFunctionExpression {
}
}
type QueryEditorExpressionType string
const (
QueryEditorExpressionTypeProperty QueryEditorExpressionType = "property"
QueryEditorExpressionTypeOperator QueryEditorExpressionType = "operator"
QueryEditorExpressionTypeOr QueryEditorExpressionType = "or"
QueryEditorExpressionTypeAnd QueryEditorExpressionType = "and"
QueryEditorExpressionTypeGroupBy QueryEditorExpressionType = "groupBy"
QueryEditorExpressionTypeFunction QueryEditorExpressionType = "function"
QueryEditorExpressionTypeFunctionParameter QueryEditorExpressionType = "functionParameter"
)
type QueryEditorFunctionParameterExpression struct {
Type QueryEditorExpressionType `json:"type"`
Name *string `json:"name,omitempty"`
@@ -265,18 +277,6 @@ func NewQueryEditorOperatorType() *QueryEditorOperatorType {
return NewStringOrBoolOrInt64()
}
type QueryEditorExpressionType string
const (
QueryEditorExpressionTypeProperty QueryEditorExpressionType = "property"
QueryEditorExpressionTypeOperator QueryEditorExpressionType = "operator"
QueryEditorExpressionTypeOr QueryEditorExpressionType = "or"
QueryEditorExpressionTypeAnd QueryEditorExpressionType = "and"
QueryEditorExpressionTypeGroupBy QueryEditorExpressionType = "groupBy"
QueryEditorExpressionTypeFunction QueryEditorExpressionType = "function"
QueryEditorExpressionTypeFunctionParameter QueryEditorExpressionType = "functionParameter"
)
type QueryEditorOperatorValueType = StringOrBoolOrInt64OrArrayOfQueryEditorOperatorType
// NewQueryEditorOperatorValueType creates a new QueryEditorOperatorValueType object.
@@ -482,7 +482,6 @@ func (resource QueryEditorPropertyExpressionOrQueryEditorFunctionExpression) Mar
if resource.QueryEditorFunctionExpression != nil {
return json.Marshal(resource.QueryEditorFunctionExpression)
}
return nil, fmt.Errorf("no value for disjunction of refs")
}