Provisioning: return field paths in test error messages (#103850)
* Provisioning: Do not block connect step on error * Display field errors * Cleanup * return field errors * fix test * convert errros to an array * Fix history display * Add getFormErrors * metav1 issues * lint * Proper field names * Fix notification * Remove unused component --------- Co-authored-by: Clarity-89 <homes89@ukr.net>
This commit is contained in:
co-authored by
Clarity-89
parent
ed9a7e8d9f
commit
2c3422fc5c
@@ -99,9 +99,9 @@ func (t *RepositoryTester) UpdateHealthStatus(ctx context.Context, cfg *provisio
|
||||
if res == nil {
|
||||
res = &provisioning.TestResults{
|
||||
Success: false,
|
||||
Errors: []string{
|
||||
"missing health status",
|
||||
},
|
||||
Errors: []provisioning.ErrorDetails{{
|
||||
Detail: "missing health status",
|
||||
}},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,11 @@ func (t *RepositoryTester) UpdateHealthStatus(ctx context.Context, cfg *provisio
|
||||
repo.Status.Health = provisioning.HealthStatus{
|
||||
Healthy: res.Success,
|
||||
Checked: time.Now().UnixMilli(),
|
||||
Message: res.Errors,
|
||||
}
|
||||
for _, err := range res.Errors {
|
||||
if err.Detail != "" {
|
||||
repo.Status.Health.Message = append(repo.Status.Health.Message, err.Detail)
|
||||
}
|
||||
}
|
||||
|
||||
_, err := t.client.Repositories(repo.GetNamespace()).
|
||||
|
||||
Reference in New Issue
Block a user