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

Show recipe template kind and path in the status #6450

Merged
merged 9 commits into from
Nov 3, 2023
Merged

Conversation

vinayada1
Copy link
Contributor

@vinayada1 vinayada1 commented Oct 10, 2023

Description

Add template kind and path to resource status. Then store these values and return in rad resource show

Type of change

  • This pull request adds or changes features of Radius and has an approved issue (issue link required).

Fixes: #6440

Auto-generated summary

🤖 Generated by Copilot at e1cbaec

Summary

📝🚀🎁

This pull request adds support for template-based resource deployment in the v20231001preview API version of the radius project. It introduces the RecipeData type and the Recipe field in various resource status types, and adds custom JSON serialization and deserialization logic for them. It also updates the ConvertFrom functions and the test cases for the affected resource types to handle the new Recipe field.

Recipe field added
To support template deployment
A new feature blooms

Walkthrough

  • Add RecipeData type to represent the recipe data for a resource deployment using templates (link, link, link)
  • Add Recipe field to ResourceStatus type to hold the recipe data for a resource deployment (link, link, link, link)
  • Populate Recipe field in ConvertFrom functions of Extender, DaprPubSubBroker, DaprSecretStore, DaprStateStore, MongoDatabase, and RedisCache types (link, link, link, link, link, link)
  • Update test cases for ConvertFrom functions of Extender, DaprPubSubBroker, DaprSecretStore, DaprStateStore, MongoDatabase, and RedisCache types to reflect the Recipe field (link, link, link, link, link, link, link)
  • Add sample data models for testing ConvertFrom functions of Extender, DaprPubSubBroker, DaprSecretStore, and DaprStateStore types with the Recipe field (link, link, link, link)
  • Simplify test case for ConvertFrom function of DaprStateStore type by removing redundant assignment of Status field (link)

@vinayada1 vinayada1 requested review from a team as code owners October 10, 2023 22:03
Copy link
Contributor

@ytimocin ytimocin left a comment

Choose a reason for hiding this comment

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

We need templateVersion for the Terraform recipes.

pkg/portableresources/types.go Outdated Show resolved Hide resolved
pkg/recipes/driver/bicep.go Outdated Show resolved Hide resolved
pkg/recipes/types.go Outdated Show resolved Hide resolved
pkg/rp/v1/recipe.go Outdated Show resolved Hide resolved
pkg/recipes/types.go Outdated Show resolved Hide resolved
pkg/rp/v1/recipe.go Outdated Show resolved Hide resolved
pkg/rp/v1/types.go Outdated Show resolved Hide resolved
pkg/corerp/api/v20231001preview/extender_conversion.go Outdated Show resolved Hide resolved
pkg/rp/v1/recipe.go Outdated Show resolved Hide resolved
pkg/recipes/types.go Outdated Show resolved Hide resolved
pkg/recipes/driver/terraform.go Outdated Show resolved Hide resolved
pkg/recipes/driver/terraform.go Outdated Show resolved Hide resolved
### Properties
* **templateKind**: string (Required): Template kind is the kind of template
* **templatePath**: string (Required): TemplatePath is the path specified in the recipe
* **templateVersion**: string: TemplateVersion is the version number of the template
Copy link
Contributor

Choose a reason for hiding this comment

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

This is supported only for a certain types of sources. Can you get @AaronCrawfis's eyes on this to convey complete information?

Copy link
Contributor

@kachawla kachawla left a comment

Choose a reason for hiding this comment

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

Can we please build clarity on re-deployment scenario before merging this PR? #6450 (comment)

pkg/corerp/api/v20231001preview/extender_conversion.go Outdated Show resolved Hide resolved
pkg/recipes/driver/bicep.go Outdated Show resolved Hide resolved
pkg/recipes/types.go Outdated Show resolved Hide resolved
@github-actions
Copy link

You are editing files which require a docs update. Please ensure you've made the appropriate changes to the docs and submitted a PR.

  • Swagger changes require reference edge docs to be updated here
  • Make sure to create a branch and submit a PR into the edge branch instead of the default latest branch, as the swagger changes will not be available until the next release.

For more information on contributing to docs please visit https://docs.radapp.dev/contributing/docs/.

@github-actions

This comment has been minimized.

@github-actions
Copy link

github-actions bot commented Oct 12, 2023

Test Results

2 980 tests  +5   2 968 ✔️ +5   2m 44s ⏱️ -3s
   256 suites ±0        12 💤 ±0 
       1 files   ±0          0 ±0 

Results for commit 2c920c4. ± Comparison against base commit f942ab2.

This pull request removes 2 and adds 7 tests. Note that renamed tests count towards both.
github.com/radius-project/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/7893932e-2fbb-4f6f-9968-4820f510d09a
github.com/radius-project/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/7893932e-2fbb-4f6f-9968-4820f510d09a#01
github.com/radius-project/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/e2b6a57b-c06b-4108-a64d-2ffb6b72bf8c
github.com/radius-project/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/e2b6a57b-c06b-4108-a64d-2ffb6b72bf8c#01
github.com/radius-project/radius/pkg/daprrp/api/v20231001preview ‑ Test_fromRecipeStatus
github.com/radius-project/radius/pkg/datastoresrp/api/v20231001preview ‑ Test_fromRecipeStatus
github.com/radius-project/radius/pkg/messagingrp/api/v20231001preview ‑ Test_fromRecipeStatus
github.com/radius-project/radius/pkg/portableresources/processors ‑ Test_Validator_SetAndValidate_Status
github.com/radius-project/radius/pkg/portableresources/processors ‑ Test_Validator_SetAndValidate_Status/status

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Oct 12, 2023

⌛ Building Radius and pushing container images for functional tests...

✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting daprrp functional tests...
⌛ Starting samples functional tests...
⌛ Starting ucp functional tests...
⌛ Starting shared functional tests...
⌛ Starting msgrp functional tests...
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
❌ msgrp functional test failed. Please check the logs for more details

@github-actions
Copy link

You are editing files which require a docs update. Please ensure you've made the appropriate changes to the docs and submitted a PR.

  • Swagger changes require reference edge docs to be updated here
  • Make sure to create a branch and submit a PR into the edge branch instead of the default latest branch, as the swagger changes will not be available until the next release.

For more information on contributing to docs please visit https://docs.radapp.dev/contributing/docs/.

@github-actions
Copy link

github-actions bot commented Oct 12, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository radius-project/radius
Commit ref refs/pull/6450/merge
Unique ID 231aa79838
Image tag pr-231aa79838
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.11.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location radiusdev.azurecr.io/test/functional/shared/recipes/<name>:pr-231aa79838
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-231aa79838
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-231aa79838
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-231aa79838
  • deployment-engine test image location: radius.azurecr.io/deployment-engine:latest

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 shared functional tests...
⌛ Starting ucp functional tests...
⌛ Starting datastoresrp functional tests...
⌛ Starting daprrp functional tests...
⌛ Starting samples functional tests...
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
❌ msgrp functional test failed. Please check the logs for more details

@github-actions
Copy link

You are editing files which require a docs update. Please ensure you've made the appropriate changes to the docs and submitted a PR.

  • Swagger changes require reference edge docs to be updated here
  • Make sure to create a branch and submit a PR into the edge branch instead of the default latest branch, as the swagger changes will not be available until the next release.

For more information on contributing to docs please visit https://docs.radapp.dev/contributing/docs/.

@github-actions
Copy link

github-actions bot commented Oct 12, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository radius-project/radius
Commit ref refs/pull/6450/merge
Unique ID 799447ff6b
Image tag pr-799447ff6b
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.11.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location radiusdev.azurecr.io/test/functional/shared/recipes/<name>:pr-799447ff6b
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-799447ff6b
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-799447ff6b
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-799447ff6b
  • deployment-engine test image location: radius.azurecr.io/deployment-engine:latest

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 shared functional tests...
⌛ Starting daprrp functional tests...
⌛ Starting datastoresrp functional tests...
✅ samples functional tests succeeded
❌ datastoresrp functional test failed. Please check the logs for more details

@github-actions
Copy link

66.5

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: 66.5 %
  • main branch coverage: 66.5 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@github-actions
Copy link

You are editing files which require a docs update. Please ensure you've made the appropriate changes to the docs and submitted a PR.

  • Swagger changes require reference edge docs to be updated here
  • Make sure to create a branch and submit a PR into the edge branch instead of the default latest branch, as the swagger changes will not be available until the next release.

For more information on contributing to docs please visit https://docs.radapp.dev/contributing/docs/.

Copy link

github-actions bot commented Nov 2, 2023

65.1

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: 65.1 %
  • main branch coverage: 65.1 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

kachawla
kachawla previously approved these changes Nov 3, 2023
test/functional/testUtil.go Outdated Show resolved Hide resolved
shalabhms
shalabhms previously approved these changes Nov 3, 2023
Co-authored-by: Shalabh Mohan Shrivastava <[email protected]>
Signed-off-by: vinayada1 <[email protected]>
@vinayada1 vinayada1 dismissed stale reviews from shalabhms and kachawla via 4c8b128 November 3, 2023 18:15
Signed-off-by: vinayada1 <[email protected]>
kachawla
kachawla previously approved these changes Nov 3, 2023
Copy link

github-actions bot commented Nov 3, 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.

Signed-off-by: vinayada1 <[email protected]>
Copy link

github-actions bot commented Nov 3, 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.

Copy link

github-actions bot commented Nov 3, 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.

@shalabhms shalabhms self-requested a review November 3, 2023 21:14
Copy link

github-actions bot commented Nov 3, 2023

65.0

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: 65.0 %
  • main branch coverage: 64.9 %
  • diff coverage: .1 %

The coverage result does not include the functional test coverage.

@vinayada1 vinayada1 merged commit deffd81 into main Nov 3, 2023
17 checks passed
@vinayada1 vinayada1 deleted the templatekindpath branch November 3, 2023 21:35
Copy link
Contributor

@kachawla kachawla left a comment

Choose a reason for hiding this comment

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

@vinayada1 Can you merge the bicep changes as well radius-project/bicep#684?

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.

Store and return the Recipe that was used as part of portable resources
5 participants