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

Fix the wrong version of container tag for Radius installation #5628

Merged
merged 15 commits into from
Jun 2, 2023

Conversation

nithyatsu
Copy link
Contributor

@nithyatsu nithyatsu commented Jun 2, 2023

Description

Hotfix to Add logic to use the versioned image.

After the fix:

kubectl cluster-info --context kind-kind

Have a nice day! 👋
nithya@Nithyas-MacBook-Pro radius % rad version
RELEASE   VERSION           BICEP     COMMIT
0.21.0    show-75-gb257abe  0.11.51   b257abea37a7bb39b8b379d9f19c2de87f81522f
nithya@Nithyas-MacBook-Pro radius % rad init
                                        
                                           
Initializing Radius...                     
                                           
✅ Install Radius show-75-gb257abe         
   - Kubernetes cluster: kind-kind         
   - Kubernetes namespace: radius-system   
✅ Create new environment default          
   - Kubernetes namespace: default         
✅ Scaffold application radius             
✅ Update local configuration              
                                           
Initialization complete! Have a RAD time 😎
                                           
                                           
nithya@Nithyas-MacBook-Pro radius % k describe pod -n radius-system ucp-7788d965c4-f2jdp 
Name:             ucp-7788d965c4-f2jdp
Namespace:        radius-system
Priority:         0
Service Account:  ucp
Node:             kind-control-plane/172.18.0.2
Start Time:       Fri, 02 Jun 2023 10:12:23 -0700
Labels:           app.kubernetes.io/part-of=radius-control-plane
                  control-plane=ucp
                  pod-template-hash=7788d965c4
Annotations:      prometheus.io/path: /metrics
                  prometheus.io/port: 9090
                  prometheus.io/scrape: true
Status:           Running
IP:               10.244.0.5
IPs:
  IP:           10.244.0.5
Controlled By:  ReplicaSet/ucp-7788d965c4
Containers:
  ucp:
    Container ID:   containerd://383d5bd2dd443ee68752cb3b78b88ae520ce4124530d3a34f6947b67121d2136
    Image:          **radius.azurecr.io/ucpd:0.21**
    Image ID:       radius.azurecr.io/ucpd@sha
nithya@Nithyas-MacBook-Pro radius % k describe pod -n radius-system bicep-de-fd7d9749c-42wf7 
Name:             bicep-de-fd7d9749c-42wf7
Namespace:        radius-system
Priority:         0
Service Account:  de-manager
Node:             kind-control-plane/172.18.0.2
Start Time:       Fri, 02 Jun 2023 10:12:23 -0700
Labels:           app.kubernetes.io/part-of=radius-control-plane
                  control-plane=de
                  pod-template-hash=fd7d9749c
Annotations:      prometheus.io/path: /metrics
                  prometheus.io/port: 6443
                  prometheus.io/scrape: true
Status:           Running
IP:               10.244.0.6
IPs:
  IP:           10.244.0.6
Controlled By:  ReplicaSet/bicep-de-fd7d9749c
Containers:
  de:
    Container ID:  containerd://6ffc6acac691e411ec4b3a48c6e18a496a50f3781eb69ad72e9a3d35e49cf4fc
    Image:         radius.azurecr.io/deployment-engine:0.21
    Image ID:      radius.azurecr.io/deployment-engine@sha
nithya@Nithyas-MacBook-Pro radius % k describe pod -n radius-system bicep-de-fd7d9749c-42wf7 
Name:             bicep-de-fd7d9749c-42wf7
Namespace:        radius-system
Priority:         0
Service Account:  de-manager
Node:             kind-control-plane/172.18.0.2
Start Time:       Fri, 02 Jun 2023 10:12:23 -0700
Labels:           app.kubernetes.io/part-of=radius-control-plane
                  control-plane=de
                  pod-template-hash=fd7d9749c
Annotations:      prometheus.io/path: /metrics
                  prometheus.io/port: 6443
                  prometheus.io/scrape: true
Status:           Running
IP:               10.244.0.6
IPs:
  IP:           10.244.0.6
Controlled By:  ReplicaSet/bicep-de-fd7d9749c
Containers:
  de:
    Container ID:  containerd://6ffc6acac691e411ec4b3a48c6e18a496a50f3781eb69ad72e9a3d35e49cf4fc
    Image:         radius.azurecr.io/deployment-engine:0.21
    Image ID:      radius.azurecr.io/deployment-engine@sha256:e312d9836a0b278eb3e43fa074258d9e6981d5e8e3c7adb0d3267f19f99b961f
    Port:          6443/TCP
    Host Port:     0/TCP
    Args:
      --kubernetes=true
    State:          Running
      Started:      Fri, 02 Jun 2023 10:12:46 -0700

nithya@Nithyas-MacBook-Pro radius % k get pods -n radius-system  
NAME                               READY   STATUS    RESTARTS   AGE
appcore-rp-7c566fd5f5-lmhj6        1/1     Running   0          6m11s
bicep-de-fd7d9749c-42wf7           1/1     Running   0          6m11s
contour-contour-7c88c58fc8-6wklr   1/1     Running   0          5m10s
contour-envoy-4wvtq                2/2     Running   0          5m10s
ucp-7788d965c4-f2jdp               1/1     Running   0          6m11s

Issue reference

Fixes: radius-project/core-team#1200

Checklist

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

  • Code compiles correctly
  • Adds necessary unit tests for change
  • Adds necessary E2E tests for change
  • Unit tests passing
  • Extended the documentation / Created issue for it

Auto-generated summary

🤖 Generated by Copilot at 0e9ded4

Summary

🎛️🖼️🛠️

This pull request enables the radius CLI to control the image version of the radius services deployed by the helm chart. It modifies pkg/cli/helm/cluster.go and pkg/cli/helm/radiusclient.go to pass and use the tag variable.

To set the image version for radius
You can use the CLI with a tag fuss
Or the helm chart with ease
And a helper, if you please
But don't forget to handle errors and format thus

Walkthrough

  • Add ImageVersion field to ClusterOptions and RadiusOptions structs to store the image version for the radius services (link, link)
  • Modify NewDefaultClusterOptions function to set the ImageVersion based on the version channel of the radius CLI (link)
  • Create AddRadiusValues function in helm package to add the image version to the helm chart values and parse the additional values from the options.Values field (link)
  • Use AddRadiusValues function in ApplyRadiusHelmChart function instead of strvals.ParseInto and add error handling and formatting (link)

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository project-radius/radius
Commit ref 0e9ded4
Unique ID c4028edabb
Image tag pr-c4028edabb
Click here to see the list of tools in the current test run
  • KinD: v0.18.0
  • Dapr: 1.10.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.0.0
  • recipe location radiusdev.azurecr.io/test/functional/corerp/recipes/<name>:pr-c4028edabb
  • appcore-rp test image location: radiusdev.azurecr.io/appcore-rp:pr-c4028edabb
  • ucp test image location: radiusdev.azurecr.io/ucpd:pr-c4028edabb

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp functional tests...
⌛ Starting samples functional tests...
❌ Failed to install Radius for samples functional test. Please check the logs for more details
❌ samples functional test failed. Please check the logs for more details
❌ Failed to install Radius for ucp functional test. Please check the logs for more details
❌ Failed to install Radius for corerp functional test. Please check the logs for more details
❌ corerp functional test failed. Please check the logs for more details

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository project-radius/radius
Commit ref 98b4dd6
Unique ID 103ab06369
Image tag pr-103ab06369
Click here to see the list of tools in the current test run
  • KinD: v0.18.0
  • Dapr: 1.10.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.0.0
  • recipe location radiusdev.azurecr.io/test/functional/corerp/recipes/<name>:pr-103ab06369
  • appcore-rp test image location: radiusdev.azurecr.io/appcore-rp:pr-103ab06369
  • ucp test image location: radiusdev.azurecr.io/ucpd:pr-103ab06369

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting samples functional tests...
⌛ Starting corerp functional tests...
⌛ Starting ucp functional tests...
❌ Failed to install Radius for samples functional test. Please check the logs for more details
❌ samples functional test failed. Please check the logs for more details
❌ Failed to install Radius for corerp functional test. Please check the logs for more details

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Test Results

2 750 tests  +2   2 743 ✔️ +2   1m 55s ⏱️ -12s
   242 suites ±0          7 💤 ±0 
       1 files   ±0          0 ±0 

Results for commit f2f8d71. ± Comparison against base commit c3b94cc.

This pull request removes 2 and adds 4 tests. Note that renamed tests count towards both.
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/ad1fa437-6a27-456b-a8f6-316984526d28
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/ad1fa437-6a27-456b-a8f6-316984526d28#01
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/71a7b691-bd54-413d-a577-12a9adac55a3
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/71a7b691-bd54-413d-a577-12a9adac55a3#01
github.com/project-radius/radius/pkg/cli/helm ‑ Test_AddRadiusValues
github.com/project-radius/radius/pkg/cli/helm ‑ Test_AddRadiusValuesOverrideWithSet

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

64.9

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 64.9 %
  • main branch coverage: 64.9 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository project-radius/radius
Commit ref f54a7d8
Unique ID a7ff562e8d
Image tag pr-a7ff562e8d
Click here to see the list of tools in the current test run
  • KinD: v0.18.0
  • Dapr: 1.10.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.0.0
  • recipe location radiusdev.azurecr.io/test/functional/corerp/recipes/<name>:pr-a7ff562e8d
  • appcore-rp test image location: radiusdev.azurecr.io/appcore-rp:pr-a7ff562e8d
  • ucp test image location: radiusdev.azurecr.io/ucpd:pr-a7ff562e8d

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp functional tests...
⌛ Starting samples functional tests...
⌛ Starting corerp functional tests...
❌ Failed to install Radius for ucp functional test. Please check the logs for more details
❌ Failed to install Radius for samples functional test. Please check the logs for more details
❌ samples functional test failed. Please check the logs for more details

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository project-radius/radius
Commit ref 0b8baf1
Unique ID 7a735127ff
Image tag pr-7a735127ff
Click here to see the list of tools in the current test run
  • KinD: v0.18.0
  • Dapr: 1.10.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.0.0
  • recipe location radiusdev.azurecr.io/test/functional/corerp/recipes/<name>:pr-7a735127ff
  • appcore-rp test image location: radiusdev.azurecr.io/appcore-rp:pr-7a735127ff
  • ucp test image location: radiusdev.azurecr.io/ucpd:pr-7a735127ff

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp functional tests...
⌛ Starting samples functional tests...
⌛ Starting corerp functional tests...
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
✅ corerp functional tests succeeded

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

64.9

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 64.9 %
  • main branch coverage: 64.9 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

Comment on lines 120 to 131
services := []string{"rp", "ucp", "de"}
for _, service := range services {
_, ok := values[service]
if !ok {
values[service] = make(map[string]any)
}
serviceconfig := values[service].(map[string]any)
serviceconfig["tag"] = options.ImageVersion
}

Choose a reason for hiding this comment

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

no one set values to rp, ucp, and de. So we can simplify the code like below.

Suggested change
services := []string{"rp", "ucp", "de"}
for _, service := range services {
_, ok := values[service]
if !ok {
values[service] = make(map[string]any)
}
serviceconfig := values[service].(map[string]any)
serviceconfig["tag"] = options.ImageVersion
}
for _, service := range []string{"rp", "ucp", "de"} {
values[service] = map[string]any{
"tag": options.ImageVersion
}
}

Copy link
Contributor Author

@nithyatsu nithyatsu Jun 2, 2023

Choose a reason for hiding this comment

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

actually, at this point we have the default values populated from values.yaml, on top of it we add the tag and then later overwrite if -- set is specified.. therefore I couldnt take this approach and make a new map.. I will remove the code from 122-125.

Choose a reason for hiding this comment

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

Ah got it. I would keep L122-L125 as is. Let's make it simpler with shorter variable names like below.

Suggested change
services := []string{"rp", "ucp", "de"}
for _, service := range services {
_, ok := values[service]
if !ok {
values[service] = make(map[string]any)
}
serviceconfig := values[service].(map[string]any)
serviceconfig["tag"] = options.ImageVersion
}
services := []string{"rp", "ucp", "de"}
for _, service := range services {
if _, ok := values[service]; !ok {
values[service] = map[string]any{}
}
o := values[service].(map[string]any)
o["tag"] = options.ImageVersion
}

@@ -114,6 +113,28 @@ func ApplyRadiusHelmChart(options RadiusOptions, kubeContext string) (bool, erro
return alreadyInstalled, err
}

func AddRadiusValues(helmChart *chart.Chart, options *RadiusOptions) error {

Choose a reason for hiding this comment

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

unnecessary space.

_, ok := values["rp"]

assert.True(t, ok)
rp := values["rp"].(map[string]any)

Choose a reason for hiding this comment

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

ucp and de need to be validated too

@nithyatsu nithyatsu changed the title [work in progress] fix for issue 5626 [ Helm chart installations aren't installing versioned images] fix for issue 5626 [ Helm chart installations aren't installing versioned images] Jun 2, 2023
@@ -44,7 +44,10 @@
"preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/rad/main.go",
"cwd": "${workspaceFolder}",
"args": [],
"args": [

Choose a reason for hiding this comment

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

Please revert back.

@nithyatsu nithyatsu marked this pull request as ready for review June 2, 2023 15:26
@nithyatsu nithyatsu requested a review from a team as a code owner June 2, 2023 15:26
@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository project-radius/radius
Commit ref a026d8c
Unique ID 50ab158321
Image tag pr-50ab158321
Click here to see the list of tools in the current test run
  • KinD: v0.18.0
  • Dapr: 1.10.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.0.0
  • recipe location radiusdev.azurecr.io/test/functional/corerp/recipes/<name>:pr-50ab158321
  • appcore-rp test image location: radiusdev.azurecr.io/appcore-rp:pr-50ab158321
  • ucp test image location: radiusdev.azurecr.io/ucpd:pr-50ab158321

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting samples functional tests...
⌛ Starting ucp functional tests...
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
✅ corerp functional tests succeeded

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository project-radius/radius
Commit ref 74e8ef4
Unique ID 01ad63b2e7
Image tag pr-01ad63b2e7
Click here to see the list of tools in the current test run
  • KinD: v0.18.0
  • Dapr: 1.10.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.0.0
  • recipe location radiusdev.azurecr.io/test/functional/corerp/recipes/<name>:pr-01ad63b2e7
  • appcore-rp test image location: radiusdev.azurecr.io/appcore-rp:pr-01ad63b2e7
  • ucp test image location: radiusdev.azurecr.io/ucpd:pr-01ad63b2e7

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting samples functional tests...
⌛ Starting corerp functional tests...
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
✅ corerp functional tests succeeded

@youngbupark
Copy link

Can you please rename the title to [Hotfix] Use the versioned container image in chart to ensure that this is hotfix ?

@nithyatsu nithyatsu requested a review from youngbupark June 2, 2023 16:02
@github-actions
Copy link

github-actions bot commented Jun 2, 2023

64.9

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 64.9 %
  • main branch coverage: 64.9 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository project-radius/radius
Commit ref 5fd17f4
Unique ID fc60263f29
Image tag pr-fc60263f29
Click here to see the list of tools in the current test run
  • KinD: v0.18.0
  • Dapr: 1.10.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.0.0
  • recipe location radiusdev.azurecr.io/test/functional/corerp/recipes/<name>:pr-fc60263f29
  • appcore-rp test image location: radiusdev.azurecr.io/appcore-rp:pr-fc60263f29
  • ucp test image location: radiusdev.azurecr.io/ucpd:pr-fc60263f29

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp functional tests...
⌛ Starting ucp functional tests...
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
✅ corerp functional tests succeeded

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository project-radius/radius
Commit ref be71fb8
Unique ID e4ca71ec54
Image tag pr-e4ca71ec54
Click here to see the list of tools in the current test run
  • KinD: v0.18.0
  • Dapr: 1.10.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.0.0
  • recipe location radiusdev.azurecr.io/test/functional/corerp/recipes/<name>:pr-e4ca71ec54
  • appcore-rp test image location: radiusdev.azurecr.io/appcore-rp:pr-e4ca71ec54
  • ucp test image location: radiusdev.azurecr.io/ucpd:pr-e4ca71ec54

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp functional tests...
⌛ Starting samples functional tests...
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
❌ corerp functional test failed. Please check the logs for more details

@AaronCrawfis
Copy link
Contributor

@nithyatsu to help with the release notes generation could you please rename this PR to be self-describing without a reference to the issue (that can go in the description). Maybe something like: "Fix CLI Helm versioning". Thanks!!

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository project-radius/radius
Commit ref 8a8ad8d
Unique ID 872abfdaf6
Image tag pr-872abfdaf6
Click here to see the list of tools in the current test run
  • KinD: v0.18.0
  • Dapr: 1.10.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.0.0
  • recipe location radiusdev.azurecr.io/test/functional/corerp/recipes/<name>:pr-872abfdaf6
  • appcore-rp test image location: radiusdev.azurecr.io/appcore-rp:pr-872abfdaf6
  • ucp test image location: radiusdev.azurecr.io/ucpd:pr-872abfdaf6

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp functional tests...
⌛ Starting samples functional tests...
⌛ Starting ucp functional tests...
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
✅ corerp functional tests succeeded

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

64.9

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 64.9 %
  • main branch coverage: 64.9 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@nithyatsu nithyatsu requested a review from youngbupark June 2, 2023 16:49
@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository project-radius/radius
Commit ref 8c9ac9b
Unique ID 3701d238d3
Image tag pr-3701d238d3
Click here to see the list of tools in the current test run
  • KinD: v0.18.0
  • Dapr: 1.10.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.0.0
  • recipe location radiusdev.azurecr.io/test/functional/corerp/recipes/<name>:pr-3701d238d3
  • appcore-rp test image location: radiusdev.azurecr.io/appcore-rp:pr-3701d238d3
  • ucp test image location: radiusdev.azurecr.io/ucpd:pr-3701d238d3

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting samples functional tests...
⌛ Starting ucp functional tests...
⌛ Starting corerp functional tests...
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
✅ corerp functional tests succeeded

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository project-radius/radius
Commit ref b257abe
Unique ID 340c119d0c
Image tag pr-340c119d0c
Click here to see the list of tools in the current test run
  • KinD: v0.18.0
  • Dapr: 1.10.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.0.0
  • recipe location radiusdev.azurecr.io/test/functional/corerp/recipes/<name>:pr-340c119d0c
  • appcore-rp test image location: radiusdev.azurecr.io/appcore-rp:pr-340c119d0c
  • ucp test image location: radiusdev.azurecr.io/ucpd:pr-340c119d0c

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting samples functional tests...
⌛ Starting ucp functional tests...
⌛ Starting corerp functional tests...
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
✅ corerp functional tests succeeded

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository project-radius/radius
Commit ref 162f1ab
Unique ID 1dbfc3b0b0
Image tag pr-1dbfc3b0b0
Click here to see the list of tools in the current test run
  • KinD: v0.18.0
  • Dapr: 1.10.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.0.0
  • recipe location radiusdev.azurecr.io/test/functional/corerp/recipes/<name>:pr-1dbfc3b0b0
  • appcore-rp test image location: radiusdev.azurecr.io/appcore-rp:pr-1dbfc3b0b0
  • ucp test image location: radiusdev.azurecr.io/ucpd:pr-1dbfc3b0b0

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting samples functional tests...
⌛ Starting corerp functional tests...
⌛ Starting ucp functional tests...
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
✅ corerp functional tests succeeded

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

64.9

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 64.9 %
  • main branch coverage: 64.9 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@nithyatsu nithyatsu requested a review from youngbupark June 2, 2023 19:27
@github-actions
Copy link

github-actions bot commented Jun 2, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository project-radius/radius
Commit ref f2f8d71
Unique ID 4c34d8e6fb
Image tag pr-4c34d8e6fb
Click here to see the list of tools in the current test run
  • KinD: v0.18.0
  • Dapr: 1.10.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.0.0
  • recipe location radiusdev.azurecr.io/test/functional/corerp/recipes/<name>:pr-4c34d8e6fb
  • appcore-rp test image location: radiusdev.azurecr.io/appcore-rp:pr-4c34d8e6fb
  • ucp test image location: radiusdev.azurecr.io/ucpd:pr-4c34d8e6fb

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp functional tests...
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
✅ corerp functional tests succeeded

@AaronCrawfis
Copy link
Contributor

@youngbupark @nithyatsu could we drop the [Hotfix] prefix? Messes with our PR docs generation when we release later.

@github-actions
Copy link

github-actions bot commented Jun 2, 2023

64.9

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 64.9 %
  • main branch coverage: 64.9 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@youngbupark
Copy link

@youngbupark @nithyatsu could we drop the [Hotfix] prefix? Messes with our PR docs generation when we release later.

Ok I didn't know it.

@nithyatsu nithyatsu changed the title [Hotfix] fix the wrong version of container tag for Radius installation Fix the wrong version of container tag for Radius installation Jun 2, 2023
@nithyatsu nithyatsu merged commit 381c73f into main Jun 2, 2023
@nithyatsu nithyatsu deleted the imageversionfix branch June 2, 2023 20:06
lakshmimsft pushed a commit that referenced this pull request Jun 2, 2023
# Description

Hotfix to Add logic to use the versioned image.

After the fix:
```
kubectl cluster-info --context kind-kind

Have a nice day! 👋
nithya@Nithyas-MacBook-Pro radius % rad version
RELEASE   VERSION           BICEP     COMMIT
0.21.0    show-75-gb257abe  0.11.51   b257abe
nithya@Nithyas-MacBook-Pro radius % rad init

Initializing Radius...

✅ Install Radius show-75-gb257abe
   - Kubernetes cluster: kind-kind
   - Kubernetes namespace: radius-system
✅ Create new environment default
   - Kubernetes namespace: default
✅ Scaffold application radius
✅ Update local configuration

Initialization complete! Have a RAD time 😎

nithya@Nithyas-MacBook-Pro radius % k describe pod -n radius-system ucp-7788d965c4-f2jdp
Name:             ucp-7788d965c4-f2jdp
Namespace:        radius-system
Priority:         0
Service Account:  ucp
Node:             kind-control-plane/172.18.0.2
Start Time:       Fri, 02 Jun 2023 10:12:23 -0700
Labels:           app.kubernetes.io/part-of=radius-control-plane
                  control-plane=ucp
                  pod-template-hash=7788d965c4
Annotations:      prometheus.io/path: /metrics
                  prometheus.io/port: 9090
                  prometheus.io/scrape: true
Status:           Running
IP:               10.244.0.5
IPs:
  IP:           10.244.0.5
Controlled By:  ReplicaSet/ucp-7788d965c4
Containers:
  ucp:
    Container ID:   containerd://383d5bd2dd443ee68752cb3b78b88ae520ce4124530d3a34f6947b67121d2136
    Image:          **radius.azurecr.io/ucpd:0.21**
    Image ID:       radius.azurecr.io/ucpd@sha
```
```
nithya@Nithyas-MacBook-Pro radius % k describe pod -n radius-system bicep-de-fd7d9749c-42wf7
Name:             bicep-de-fd7d9749c-42wf7
Namespace:        radius-system
Priority:         0
Service Account:  de-manager
Node:             kind-control-plane/172.18.0.2
Start Time:       Fri, 02 Jun 2023 10:12:23 -0700
Labels:           app.kubernetes.io/part-of=radius-control-plane
                  control-plane=de
                  pod-template-hash=fd7d9749c
Annotations:      prometheus.io/path: /metrics
                  prometheus.io/port: 6443
                  prometheus.io/scrape: true
Status:           Running
IP:               10.244.0.6
IPs:
  IP:           10.244.0.6
Controlled By:  ReplicaSet/bicep-de-fd7d9749c
Containers:
  de:
    Container ID:  containerd://6ffc6acac691e411ec4b3a48c6e18a496a50f3781eb69ad72e9a3d35e49cf4fc
    Image:         radius.azurecr.io/deployment-engine:0.21
    Image ID:      radius.azurecr.io/deployment-engine@sha
```
```
nithya@Nithyas-MacBook-Pro radius % k describe pod -n radius-system bicep-de-fd7d9749c-42wf7
Name:             bicep-de-fd7d9749c-42wf7
Namespace:        radius-system
Priority:         0
Service Account:  de-manager
Node:             kind-control-plane/172.18.0.2
Start Time:       Fri, 02 Jun 2023 10:12:23 -0700
Labels:           app.kubernetes.io/part-of=radius-control-plane
                  control-plane=de
                  pod-template-hash=fd7d9749c
Annotations:      prometheus.io/path: /metrics
                  prometheus.io/port: 6443
                  prometheus.io/scrape: true
Status:           Running
IP:               10.244.0.6
IPs:
  IP:           10.244.0.6
Controlled By:  ReplicaSet/bicep-de-fd7d9749c
Containers:
  de:
    Container ID:  containerd://6ffc6acac691e411ec4b3a48c6e18a496a50f3781eb69ad72e9a3d35e49cf4fc
    Image:         radius.azurecr.io/deployment-engine:0.21
    Image ID:      radius.azurecr.io/deployment-engine@sha256:e312d9836a0b278eb3e43fa074258d9e6981d5e8e3c7adb0d3267f19f99b961f
    Port:          6443/TCP
    Host Port:     0/TCP
    Args:
      --kubernetes=true
    State:          Running
      Started:      Fri, 02 Jun 2023 10:12:46 -0700

```
```
nithya@Nithyas-MacBook-Pro radius % k get pods -n radius-system
NAME                               READY   STATUS    RESTARTS   AGE
appcore-rp-7c566fd5f5-lmhj6        1/1     Running   0          6m11s
bicep-de-fd7d9749c-42wf7           1/1     Running   0          6m11s
contour-contour-7c88c58fc8-6wklr   1/1     Running   0          5m10s
contour-envoy-4wvtq                2/2     Running   0          5m10s
ucp-7788d965c4-f2jdp               1/1     Running   0          6m11s
```
## Issue reference

Fixes: #5624

## Checklist

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

* [ ] Code compiles correctly
* [ ] Adds necessary unit tests for change
* [ ] Adds necessary E2E tests for change
* [ ] Unit tests passing
* [ ] Extended the documentation / Created issue for it

## Auto-generated summary

<!--
GitHub Copilot for docs will auto-generate a summary of the PR
-->

<!--
copilot:all
-->
### <samp>🤖 Generated by Copilot at 0e9ded4</samp>

### Summary
🎛️🖼️🛠️

<!--
1. 🎛️ - This emoji represents the radius CLI and the ability to control
the image version for the radius services. It suggests a sense of
configuration and customization.
2. 🖼️ - This emoji represents the image version and the helm chart. It
suggests a sense of visualizing and updating the software components.
3. 🛠️ - This emoji represents the refactoring and error handling
improvements. It suggests a sense of fixing and enhancing the code
quality.
-->
This pull request enables the radius CLI to control the image version of
the radius services deployed by the helm chart. It modifies
`pkg/cli/helm/cluster.go` and `pkg/cli/helm/radiusclient.go` to pass and
use the `tag` variable.

> _To set the image version for radius_
> _You can use the CLI with a `tag` fuss_
> _Or the helm chart with ease_
> _And a helper, if you please_
> _But don't forget to handle errors and format thus_

### Walkthrough
* Add `ImageVersion` field to `ClusterOptions` and `RadiusOptions`
structs to store the image version for the radius services
([link](https://github.com/project-radius/radius/pull/5628/files?diff=unified&w=0#diff-a94c29c96fb0778e35d7983669dedfa10de7111040707a3839dace9836b20d0bR64),
[link](https://github.com/project-radius/radius/pull/5628/files?diff=unified&w=0#diff-7f93f7a0f0c6c2329155f30e6a4cc6928277acabefab4c28826cb143a23ce90eR46))
* Modify `NewDefaultClusterOptions` function to set the `ImageVersion`
based on the version channel of the radius CLI
([link](https://github.com/project-radius/radius/pull/5628/files?diff=unified&w=0#diff-a94c29c96fb0778e35d7983669dedfa10de7111040707a3839dace9836b20d0bR53-R57))
* Create `AddRadiusValues` function in `helm` package to add the image
version to the helm chart values and parse the additional values from
the `options.Values` field
([link](https://github.com/project-radius/radius/pull/5628/files?diff=unified&w=0#diff-7f93f7a0f0c6c2329155f30e6a4cc6928277acabefab4c28826cb143a23ce90eR116-R134))
* Use `AddRadiusValues` function in `ApplyRadiusHelmChart` function
instead of `strvals.ParseInto` and add error handling and formatting
([link](https://github.com/project-radius/radius/pull/5628/files?diff=unified&w=0#diff-7f93f7a0f0c6c2329155f30e6a4cc6928277acabefab4c28826cb143a23ce90eL75-R78))

(cherry picked from commit 381c73f)
lakshmimsft added a commit that referenced this pull request Jun 2, 2023
# Description

Including changes in
[PR](#5628) for Release
v0.21 per issue described in #5624

Fixes: 5624

## Checklist

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

* [ ] Code compiles correctly
* [ ] Adds necessary unit tests for change
* [ ] Adds necessary E2E tests for change
* [ ] Unit tests passing
* [ ] Extended the documentation / Created issue for it

## Auto-generated summary


<!--
copilot:all
-->
### <samp>🤖 Generated by Copilot at bd4f105</samp>

### Summary
🧪📝🚀

<!--
1.  🧪 for adding unit tests to the helm package
2.  📝 for updating the documentation and validation workflow
3. 🚀 for adding support for image version channels and refactoring the
helm chart values parsing
-->
This pull request updates the bicep validation workflow and adds support
for specifying image version based on version channel for radius cluster
and service creation. It also refactors the helm chart values parsing
and adds unit tests for the new function. The changes affect the
`.github/workflows/validate-bicep.yaml`, `pkg/cli/helm/cluster.go`,
`pkg/cli/helm/radiusclient.go`, and `pkg/cli/helm/radiusclient_test.go`
files.

> _We're setting sail with `radius` on the helm_
> _We've added tests and options for the image tag_
> _We've updated the workflow with the latest tools_
> _So heave away, me hearties, heave away_

### Walkthrough
* Update the refs and URL for the docs, samples, and rad-bicep-corerp
tool to use the stable release branch and version
([link](https://github.com/project-radius/radius/pull/5633/files?diff=unified&w=0#diff-4f41a75886a1a479805bae1b7fb335479735aa7740e02b9e5c19992ead18f73eL40-R40),
[link](https://github.com/project-radius/radius/pull/5633/files?diff=unified&w=0#diff-4f41a75886a1a479805bae1b7fb335479735aa7740e02b9e5c19992ead18f73eL47-R47),
[link](https://github.com/project-radius/radius/pull/5633/files?diff=unified&w=0#diff-4f41a75886a1a479805bae1b7fb335479735aa7740e02b9e5c19992ead18f73eL60-R60))
* Add the tag variable and the ImageVersion field to the ClusterOptions
struct and the NewDefaultClusterOptions function in `cluster.go` to
determine the image tag for the radius cluster based on the version
channel
([link](https://github.com/project-radius/radius/pull/5633/files?diff=unified&w=0#diff-a94c29c96fb0778e35d7983669dedfa10de7111040707a3839dace9836b20d0bR51-R55),
[link](https://github.com/project-radius/radius/pull/5633/files?diff=unified&w=0#diff-a94c29c96fb0778e35d7983669dedfa10de7111040707a3839dace9836b20d0bR62))
* Add the ImageVersion field to the RadiusOptions struct in
`radiusclient.go` to allow overriding the default image tag for the
radius services
([link](https://github.com/project-radius/radius/pull/5633/files?diff=unified&w=0#diff-7f93f7a0f0c6c2329155f30e6a4cc6928277acabefab4c28826cb143a23ce90eL43-R47))
* Add the AddRadiusValues function to the helm package and call it in
`radiusclient.go` to add the image version and the options.Values to the
helm chart values in a specific order of priority
([link](https://github.com/project-radius/radius/pull/5633/files?diff=unified&w=0#diff-7f93f7a0f0c6c2329155f30e6a4cc6928277acabefab4c28826cb143a23ce90eL69-R76),
[link](https://github.com/project-radius/radius/pull/5633/files?diff=unified&w=0#diff-7f93f7a0f0c6c2329155f30e6a4cc6928277acabefab4c28826cb143a23ce90eR114-R137))
* Capitalize the error messages for consistency in `radiusclient.go`
([link](https://github.com/project-radius/radius/pull/5633/files?diff=unified&w=0#diff-7f93f7a0f0c6c2329155f30e6a4cc6928277acabefab4c28826cb143a23ce90eL58-R60),
[link](https://github.com/project-radius/radius/pull/5633/files?diff=unified&w=0#diff-7f93f7a0f0c6c2329155f30e6a4cc6928277acabefab4c28826cb143a23ce90eL98-R98),
[link](https://github.com/project-radius/radius/pull/5633/files?diff=unified&w=0#diff-7f93f7a0f0c6c2329155f30e6a4cc6928277acabefab4c28826cb143a23ce90eL105-R105))
* Add the `radiusclient_test.go` file and two unit tests for the
AddRadiusValues function using the testify library
([link](https://github.com/project-radius/radius/pull/5633/files?diff=unified&w=0#diff-d86037fd6c18ac1d33c42f14b22694ed549f413bc6f01e486edcc069e3e50e08R1-R110))

---------

Co-authored-by: nithyatsu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants