diff --git a/pkg/corerp/backend/controller/createorupdateresource.go b/pkg/corerp/backend/controller/createorupdateresource.go index 3ca8c6787bc..8e7b028b338 100644 --- a/pkg/corerp/backend/controller/createorupdateresource.go +++ b/pkg/corerp/backend/controller/createorupdateresource.go @@ -33,6 +33,7 @@ import ( rpv1 "github.com/radius-project/radius/pkg/rp/v1" "github.com/radius-project/radius/pkg/ucp/resources" "github.com/radius-project/radius/pkg/ucp/store" + "github.com/radius-project/radius/pkg/ucp/ucplog" ) var _ ctrl.Controller = (*CreateOrUpdateResource)(nil) @@ -101,9 +102,11 @@ func (c *CreateOrUpdateResource) Run(ctx context.Context, request *ctrl.Request) return ctrl.Result{}, err } - deploymentOutput, err := c.DeploymentProcessor().Deploy(ctx, id, rendererOutput) - if err != nil { - return ctrl.Result{}, err + deploymentOutput, deployErr := c.DeploymentProcessor().Deploy(ctx, id, rendererOutput) + if deployErr != nil { + logger := ucplog.FromContextOrDiscard(ctx) + logger.Info("failed to deploy resource", "resourceID", id.String()) + //return ctrl.Result{}, err } deploymentDataModel, ok := dataModel.(rpv1.DeploymentDataModel) @@ -136,5 +139,5 @@ func (c *CreateOrUpdateResource) Run(ctx context.Context, request *ctrl.Request) return ctrl.Result{}, err } - return ctrl.Result{}, err + return ctrl.Result{}, deployErr } diff --git a/pkg/corerp/backend/deployment/deploymentprocessor.go b/pkg/corerp/backend/deployment/deploymentprocessor.go index 2cbdb7275c7..133536c14b6 100644 --- a/pkg/corerp/backend/deployment/deploymentprocessor.go +++ b/pkg/corerp/backend/deployment/deploymentprocessor.go @@ -287,7 +287,18 @@ func (dp *deploymentProcessor) Deploy(ctx context.Context, id resources.ID, rend err := dp.deployOutputResource(ctx, id, rendererOutput, computedValues, &handlers.PutOptions{Resource: &outputResource, DependencyProperties: deployedOutputResourceProperties}) if err != nil { - return rpv1.DeploymentOutput{}, err + outputResource := rpv1.OutputResource{ + LocalID: outputResource.LocalID, + ID: outputResource.ID, + } + deployedOutputResources = append(deployedOutputResources, outputResource) + + return rpv1.DeploymentOutput{ + DeployedOutputResources: deployedOutputResources, + ComputedValues: computedValues, + SecretValues: rendererOutput.SecretValues, + }, err + //return rpv1.DeploymentOutput{}, err } if outputResource.ID.IsEmpty() {