Skip to content

Commit

Permalink
Follow up pr for linkrp backend controller. (#5049)
Browse files Browse the repository at this point in the history
# Description

Addressing few pr comments from
#5006

## Issue reference

<!--
We strive to have all PR being opened based on an issue, where the
problem or feature have been discussed prior to implementation.
-->

Fixes: #issue_number

## Checklist

Please make sure you've completed the relevant tasks for this PR, out of
the following list:

* [x] Code compiles correctly
* [ ] Adds necessary unit tests for change
* [ ] Adds necessary E2E tests for change
* [x] Unit tests passing
* [ ] Extended the documentation / Created issue for it
  • Loading branch information
vishwahiremat authored Jan 30, 2023
1 parent d33e260 commit 4d2a5d0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ jobs:
runs-on: self-hosted
env:
# Timeout used for Kubernetes functional tests
K8S_FUNCTIONALTEST_TIMEOUT: 30m
K8S_FUNCTIONALTEST_TIMEOUT: 60m
RADIUS_CONTAINER_LOG_BASE: dist/container_logs
RADIUS_CHART_LOCATION: deploy/Chart/
steps:
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ variables:
- name: DOCKER_REGISTRY
value: radiusdev.azurecr.io
- name: K8S_FUNCTIONALTEST_TIMEOUT
value: 30m
value: 60m
- name: AZURE_FUNCTIONALTEST_TIMEOUT
value: 30m
value: 60m
- name: REL_CHANNEL
value: edge
- name: REL_VERSION
Expand Down
10 changes: 5 additions & 5 deletions pkg/linkrp/backend/controller/createorupdateresource.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ func (c *CreateOrUpdateResource) Run(ctx context.Context, req *ctrl.Request) (ct
return ctrl.Result{}, err
}

deploymentDataModel, ok := dataModel.(rpv1.DeploymentDataModel)
if !ok {
return ctrl.NewFailedResult(v1.ErrorDetails{Message: "deployment data model conversion error"}), err
}

rendererOutput, err := c.LinkDeploymentProcessor().Render(ctx, id, dataModel)
if err != nil {
return ctrl.Result{}, err
Expand All @@ -70,11 +75,6 @@ func (c *CreateOrUpdateResource) Run(ctx context.Context, req *ctrl.Request) (ct
return ctrl.Result{}, err
}

deploymentDataModel, ok := dataModel.(rpv1.DeploymentDataModel)
if !ok {
return ctrl.NewFailedResult(v1.ErrorDetails{Message: "deployment data model conversion error"}), err
}

oldOutputResources := deploymentDataModel.OutputResources()
err = deploymentDataModel.ApplyDeploymentOutput(deploymentOutput)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@description('Specifies the location for resources.')
param location string = resourceGroup().location
resource account 'Microsoft.Storage/storageAccounts@2021-09-01' = {
name: 'dapr${uniqueString(resourceGroup().id, deployment().name)}'
name: 'daprrecipe${uniqueString(resourceGroup().id, deployment().name)}'
location: location
sku: {
name: 'Standard_LRS'
Expand Down

0 comments on commit 4d2a5d0

Please sign in to comment.