Skip to content

Commit 29c419e

Browse files
committed
clarify that the controller will not retry and that the spec needs to change
Signed-off-by: Eguzki Astiz Lezaun <eastizle@redhat.com>
1 parent 563c2df commit 29c419e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

internal/controller/apiproduct_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ func (r *APIProductReconciler) openAPIStatus(ctx context.Context, apiProductObj
458458
MaxSizeUsed: r.OpenAPISpecMaxSize},
459459
&OpenAPISpecErr{
460460
Reason: "RequestCreationFailed",
461-
Message: fmt.Sprintf("failed to create HTTP request for OpenAPI spec: %v", err),
461+
Message: fmt.Sprintf("failed to create HTTP request for OpenAPI spec: %v. Controller will not retry; the spec needs to change", err),
462462
}
463463
}
464464

@@ -470,7 +470,7 @@ func (r *APIProductReconciler) openAPIStatus(ctx context.Context, apiProductObj
470470
MaxSizeUsed: r.OpenAPISpecMaxSize},
471471
&OpenAPISpecErr{
472472
Reason: "FetchFailed",
473-
Message: fmt.Sprintf("failed to fetch OpenAPI spec from %s: %v", openAPIURL, err),
473+
Message: fmt.Sprintf("failed to fetch OpenAPI spec from %s: %v. Controller will not retry; the spec needs to change", openAPIURL, err),
474474
}
475475
}
476476
defer func() {
@@ -486,7 +486,7 @@ func (r *APIProductReconciler) openAPIStatus(ctx context.Context, apiProductObj
486486
MaxSizeUsed: r.OpenAPISpecMaxSize},
487487
&OpenAPISpecErr{
488488
Reason: "FetchFailed",
489-
Message: fmt.Sprintf("failed to fetch OpenAPI spec from %s: unexpected status code %d", openAPIURL, resp.StatusCode),
489+
Message: fmt.Sprintf("failed to fetch OpenAPI spec from %s: unexpected status code %d. Controller will not retry; the spec needs to change", openAPIURL, resp.StatusCode),
490490
}
491491
}
492492

@@ -498,7 +498,7 @@ func (r *APIProductReconciler) openAPIStatus(ctx context.Context, apiProductObj
498498
MaxSizeUsed: r.OpenAPISpecMaxSize},
499499
&OpenAPISpecErr{
500500
Reason: "ReadFailed",
501-
Message: fmt.Sprintf("failed to read OpenAPI spec response body: %v", err),
501+
Message: fmt.Sprintf("failed to read OpenAPI spec response body: %v. Controller will not retry; the spec needs to change", err),
502502
}
503503
}
504504

@@ -513,7 +513,7 @@ func (r *APIProductReconciler) openAPIStatus(ctx context.Context, apiProductObj
513513
MaxSizeUsed: r.OpenAPISpecMaxSize,
514514
}, &OpenAPISpecErr{
515515
Reason: "SpecSizeTooLarge",
516-
Message: fmt.Sprintf("OpenAPI spec exceeds size limit (%d bytes)", maxSize),
516+
Message: fmt.Sprintf("OpenAPI spec exceeds size limit (%d bytes). Controller will not retry; the spec needs to change", maxSize),
517517
}
518518

519519
}

0 commit comments

Comments
 (0)