Advisor: Update app-sdk and regenerate code (#107786)

This commit is contained in:
Andres Martinez Gotor
2025-07-10 09:55:10 +02:00
committed by GitHub
parent 85a6a7b9c1
commit e4650d3d8f
18 changed files with 341 additions and 174 deletions
@@ -86,7 +86,7 @@ func (s *Service) ReportSummary(ctx context.Context) (*ReportInfo, error) {
latestDatasourceCheck := findLatestCheck(checkList.GetItems(), datasourcecheck.CheckID)
reportInfo := &ReportInfo{}
if latestPluginCheck != nil {
for _, failure := range latestPluginCheck.CheckStatus.Report.Failures {
for _, failure := range latestPluginCheck.Status.Report.Failures {
switch failure.StepID {
case plugincheck.UpdateStepID:
reportInfo.PluginsOutdated++
@@ -96,7 +96,7 @@ func (s *Service) ReportSummary(ctx context.Context) (*ReportInfo, error) {
}
}
if latestDatasourceCheck != nil {
for _, failure := range latestDatasourceCheck.CheckStatus.Report.Failures {
for _, failure := range latestDatasourceCheck.Status.Report.Failures {
if failure.StepID == datasourcecheck.HealthCheckStepID {
reportInfo.DatasourcesUnhealthy++
}
@@ -41,8 +41,8 @@ func TestService_ReportSummary(t *testing.T) {
checks.TypeLabel: plugincheck.CheckID,
},
},
CheckStatus: advisorv0alpha1.CheckStatus{
Report: advisorv0alpha1.CheckV0alpha1StatusReport{
Status: advisorv0alpha1.CheckStatus{
Report: advisorv0alpha1.CheckReport{
Failures: []advisorv0alpha1.CheckReportFailure{
{StepID: plugincheck.UpdateStepID},
},
@@ -56,8 +56,8 @@ func TestService_ReportSummary(t *testing.T) {
checks.TypeLabel: plugincheck.CheckID,
},
},
CheckStatus: advisorv0alpha1.CheckStatus{
Report: advisorv0alpha1.CheckV0alpha1StatusReport{
Status: advisorv0alpha1.CheckStatus{
Report: advisorv0alpha1.CheckReport{
Failures: []advisorv0alpha1.CheckReportFailure{
{StepID: plugincheck.UpdateStepID},
{StepID: plugincheck.DeprecationStepID},
@@ -72,8 +72,8 @@ func TestService_ReportSummary(t *testing.T) {
checks.TypeLabel: datasourcecheck.CheckID,
},
},
CheckStatus: advisorv0alpha1.CheckStatus{
Report: advisorv0alpha1.CheckV0alpha1StatusReport{
Status: advisorv0alpha1.CheckStatus{
Report: advisorv0alpha1.CheckReport{
Failures: []advisorv0alpha1.CheckReportFailure{
{StepID: datasourcecheck.HealthCheckStepID},
{StepID: datasourcecheck.HealthCheckStepID},
@@ -2303,6 +2303,7 @@
]
},
"spec": {
"description": "Spec is the spec of the Check",
"default": {},
"allOf": [
{
@@ -2389,6 +2390,33 @@
}
]
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckReport": {
"type": "object",
"required": [
"count",
"failures"
],
"properties": {
"count": {
"description": "Number of elements analyzed",
"type": "integer",
"format": "int64",
"default": 0
},
"failures": {
"description": "List of failures",
"type": "array",
"items": {
"default": {},
"allOf": [
{
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckReportFailure"
}
]
}
}
}
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckReportFailure": {
"type": "object",
"required": [
@@ -2479,7 +2507,7 @@
"default": {},
"allOf": [
{
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckV0alpha1StatusReport"
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckReport"
}
]
}
@@ -2510,6 +2538,7 @@
]
},
"spec": {
"description": "Spec is the spec of the CheckType",
"default": {},
"allOf": [
{
@@ -2682,33 +2711,6 @@
}
}
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckV0alpha1StatusReport": {
"type": "object",
"required": [
"count",
"failures"
],
"properties": {
"count": {
"description": "Number of elements analyzed",
"type": "integer",
"format": "int64",
"default": 0
},
"failures": {
"description": "List of failures",
"type": "array",
"items": {
"default": {},
"allOf": [
{
"$ref": "#/components/schemas/com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckReportFailure"
}
]
}
}
}
},
"com.github.grafana.grafana.apps.advisor.pkg.apis.advisor.v0alpha1.CheckstatusOperatorState": {
"type": "object",
"required": [