Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a check to a cast to the Recipe object #7797

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/applications-rp/radius-cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ featureFlags:
- "PLACEHOLDER"
ucp:
kind: kubernetes
# Logging configuration
# Logging configuration
logging:
level: "info"
json: false
Expand Down
4 changes: 2 additions & 2 deletions cmd/controller/controller-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ server:
host: "0.0.0.0"
port: 8083

# workerServer port specifies port set for Health Checks
# workerServer port specifies port set for Health Checks
workerServer:
port: 3000
ucp:
Expand All @@ -22,4 +22,4 @@ ucp:
endpoint: "http://localhost:9000/apis/api.ucp.dev/v1alpha3"
logging:
level: "info"
json: false
json: false
5 changes: 4 additions & 1 deletion pkg/controller/reconciler/deployment_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,10 @@ func (r *DeploymentReconciler) saveState(ctx context.Context, deployment *appsv1
}

func (r *DeploymentReconciler) findDeploymentsForRecipe(ctx context.Context, obj client.Object) []reconcile.Request {
recipe := obj.(*radappiov1alpha3.Recipe)
recipe, ok := obj.(*radappiov1alpha3.Recipe)
if !ok {
return []reconcile.Request{}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unfortunate that there's no good way to return an error here. I agree that skipping is the most reasonable thing to do.


deployments := &appsv1.DeploymentList{}
options := &client.ListOptions{
Expand Down