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

Add recipe support to dynamic RP (#8191 Continued) #8267

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lakshmimsft
Copy link
Contributor

@lakshmimsft lakshmimsft commented Jan 21, 2025

This is continuation of the previous PR (#8191)
All comments from previous PR will be addressed here.

Description

Original Description:
This change implements recipe support fo the dynamic RP. With this feature, a user-defined-type can declare the SupportsRecipes capability, and then it will be processed by the recipe engine.

The main change here is to the core datamodel interfaces used by our shared controllers. These interfaces have some problematic definitions that rely on returning pointers to go-structs so they can be mutated and saved to the database. This general approach does not work for UDT, or any other design besides the portable resources.

To understand this problem in more detail, consider that ".properties.status" is user-defined for a UDT. The existing interfaces assume that all resources have the same go struct at ".properties.status". Because UDT is extensible, we cannot write a single go-struct that captures all possible status values, but that's required by the current interfaces. Clearly we need something more flexible.

I took the approach of making minimal changes in this PR, but we should improve the design longer-term.

Type of change

Fixes: Part of #6688

Contributor checklist

Please verify that the PR meets the following requirements, where applicable:

  • An overview of proposed schema changes is included in a linked GitHub issue.
  • A design document PR is created in the design-notes repository, if new APIs are being introduced.
  • If applicable, design document has been reviewed and approved by Radius maintainers/approvers.
  • A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
  • A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.

@radius-functional-tests
Copy link

radius-functional-tests bot commented Jan 22, 2025

Radius functional test overview

🔍 Go to test action run

Name Value
Repository lakshmimsft/radius-mainfork
Commit ref c1a1fa7
Unique ID func8991188e75
Image tag pr-func8991188e75
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func8991188e75
  • 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-func8991188e75
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func8991188e75
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func8991188e75
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func8991188e75
  • deployment-engine test image location: ghcr.io/radius-project/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 corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
❌ Failed to install Radius for ucp-cloud functional test. Please check the logs for more details
❌ ucp-cloud functional test failed. Please check the logs for more details
❌ corerp-cloud functional test cancelled. Please check the logs for more details
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
❌ ucp-cloud functional test failed. Please check the logs for more details
❌ corerp-cloud functional test cancelled. Please check the logs for more details

This change implements recipe support fo the dynamic RP. With this feature, a user-defined-type can declare the SupportsRecipes capability, and then it will be processed by the recipe engine.

The main change here is to the core datamodel interfaces used by our shared controllers. These interfaces have some problematic definitions that rely on returning pointers to go-structs so they can be mutated and saved to the database. This general approach does not work for UDT, or any other design besides the portable resources.

To understand this problem in more detail, consider that ".properties.status" is user-defined for a UDT. The existing interfaces assume that all resources have the same go struct at ".properties.status". Because UDT is extensible, we cannot write a single go-struct that captures all possible status values, but that's required by the current interfaces. Clearly we need something more flexible.

I took the approach of making minimal changes in this PR, but we should improve the design longer-term.

Signed-off-by: Ryan Nowak <[email protected]>
@radius-functional-tests
Copy link

radius-functional-tests bot commented Jan 22, 2025

Radius functional test overview

🔍 Go to test action run

Name Value
Repository lakshmimsft/radius-mainfork
Commit ref 84c52fd
Unique ID func9126d64ddf
Image tag pr-func9126d64ddf
Click here to see the list of tools in the current test run
  • gotestsum 1.12.0
  • KinD: v0.20.0
  • Dapr:
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func9126d64ddf
  • 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-func9126d64ddf
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func9126d64ddf
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func9126d64ddf
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func9126d64ddf
  • deployment-engine test image location: ghcr.io/radius-project/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 corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
❌ corerp-cloud functional test failed. Please check the logs for more details
⌛ Starting corerp-cloud functional tests...
❌ corerp-cloud functional test failed. Please check the logs for more details

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.

2 participants