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

Update typespec to support all Terraform Recipe Providers #7199

Conversation

ytimocin
Copy link
Contributor

@ytimocin ytimocin commented Feb 25, 2024

Description

  • Did some refactoring
  • Updated TypeSpec by adding Providers and EnvVariables to Environment resource
  • Updated Data Models by adding Providers and EnvVariables to Environment resource
  • Updated the Environment Conversion logic and its tests
  • Updated RecipeConfigProperties

Design doc: radius-project/design-notes#39

Type of change

@radius-functional-tests
Copy link

radius-functional-tests bot commented Feb 25, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository vishwahiremat/radius
Commit ref e8a8bc2
Unique ID ca3c92c713
Image tag pr-ca3c92c713
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/functional/shared/recipes/<name>:pr-ca3c92c713
  • 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-ca3c92c713
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-ca3c92c713
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-ca3c92c713
  • 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 datastoresrp functional tests...
⌛ Starting ucp functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting daprrp functional tests...
⌛ Starting shared functional tests...
⌛ Starting samples functional tests...
⌛ Starting kubernetes functional tests...
✅ msgrp functional tests succeeded
✅ samples functional tests succeeded
✅ kubernetes functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ ucp functional tests succeeded
✅ daprrp functional tests succeeded
✅ shared functional tests succeeded

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.

Could you look into comments on the original version of this PR vishwahiremat#1?

@ytimocin ytimocin force-pushed the ytimocin/multipleTFProviders2 branch 2 times, most recently from b55ecf4 to fbdba5c Compare February 26, 2024 16:21
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.

Please update the PR title and description to provide context on the change. It is in general good practice to write the description in a way that anyone can understand what the PR is about, think about someone looking at the commit in the future to understand what this change is, why it was etc.

@ytimocin ytimocin force-pushed the ytimocin/multipleTFProviders2 branch 2 times, most recently from 8dab28e to 6ff48cd Compare February 26, 2024 20:33
@radius-functional-tests
Copy link

radius-functional-tests bot commented Feb 26, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository vishwahiremat/radius
Commit ref 6ff48cd
Unique ID 55e5f1b88e
Image tag pr-55e5f1b88e
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/functional/shared/recipes/<name>:pr-55e5f1b88e
  • 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-55e5f1b88e
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-55e5f1b88e
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-55e5f1b88e
  • 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 daprrp functional tests...
⌛ Starting samples functional tests...
⌛ Starting shared functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting kubernetes functional tests...
⌛ Starting ucp functional tests...
⌛ Starting datastoresrp functional tests...
✅ samples functional tests succeeded
✅ kubernetes functional tests succeeded
✅ msgrp functional tests succeeded
✅ daprrp functional tests succeeded
✅ ucp functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ shared functional tests succeeded

@ytimocin ytimocin changed the title Initial work on adding support for the multiple TF Providers Update typespec, datamodel, converter, and tests for Provider and EnvironmentVariables Feb 26, 2024
@kachawla kachawla changed the title Update typespec, datamodel, converter, and tests for Provider and EnvironmentVariables Update typespec to support all Terraform Recipe Providers Feb 26, 2024
@kachawla
Copy link
Contributor

kachawla commented Feb 26, 2024

Please update the PR title and description to provide context on the change. It is in general good practice to write the description in a way that anyone can understand what the PR is about, think about someone looking at the commit in the future to understand what this change is, why it was etc.

Saw the updated title - The title should include a brief description of the functionality this PR is adding and the component it is touching. Details of which files/components are updated should be in the description. I have updated the title from Update typespec, datamodel, converter, and tests for Provider and EnvironmentVariables to Update typespec to support all Terraform Recipe Providers. And have included link to the design doc in the description.

When writing the description, I'd suggest think about someone who is fairly new to the repo, can they tell the summary of why and what changes are made by looking at the commit description?

typespec/Applications.Core/environments.tsp Show resolved Hide resolved
typespec/Applications.Core/environments.tsp Outdated Show resolved Hide resolved
typespec/Applications.Core/environments.tsp Outdated Show resolved Hide resolved
typespec/Applications.Core/environments.tsp Outdated Show resolved Hide resolved
typespec/Applications.Core/environments.tsp Outdated Show resolved Hide resolved
@ytimocin ytimocin force-pushed the ytimocin/multipleTFProviders2 branch 3 times, most recently from aa5bfd8 to 3163303 Compare February 26, 2024 23:56
@radius-functional-tests
Copy link

radius-functional-tests bot commented Feb 26, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository vishwahiremat/radius
Commit ref 3163303
Unique ID 1632767d41
Image tag pr-1632767d41
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/functional/shared/recipes/<name>:pr-1632767d41
  • 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-1632767d41
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-1632767d41
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-1632767d41
  • 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 shared functional tests...
⌛ Starting samples functional tests...
⌛ Starting ucp functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting kubernetes functional tests...
⌛ Starting daprrp functional tests...
✅ msgrp functional tests succeeded
✅ samples functional tests succeeded
✅ kubernetes functional tests succeeded
✅ ucp functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ daprrp functional tests succeeded
✅ shared functional tests succeeded

}
}
}
},
"providers": {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we have test coverage for empty values for these?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we have empty data model and resource examples.

pkg/corerp/datamodel/recipe_types.go Outdated Show resolved Hide resolved
pkg/corerp/datamodel/recipe_types.go Outdated Show resolved Hide resolved
pkg/corerp/datamodel/recipe_types.go Outdated Show resolved Hide resolved
pkg/corerp/datamodel/recipe_types.go Outdated Show resolved Hide resolved
@radius-functional-tests
Copy link

radius-functional-tests bot commented Feb 27, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository vishwahiremat/radius
Commit ref 6ee7274
Unique ID ff7cf5e174
Image tag pr-ff7cf5e174
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/functional/shared/recipes/<name>:pr-ff7cf5e174
  • 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-ff7cf5e174
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-ff7cf5e174
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-ff7cf5e174
  • 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 daprrp functional tests...
⌛ Starting samples functional tests...
⌛ Starting kubernetes functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting datastoresrp functional tests...
⌛ Starting ucp functional tests...
⌛ Starting shared functional tests...
✅ msgrp functional tests succeeded
✅ samples functional tests succeeded
✅ kubernetes functional tests succeeded
✅ ucp functional tests succeeded
✅ daprrp functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ shared functional tests succeeded

@radius-functional-tests
Copy link

radius-functional-tests bot commented Feb 27, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository vishwahiremat/radius
Commit ref 7b3eb9e
Unique ID bc131d25e6
Image tag pr-bc131d25e6
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/functional/shared/recipes/<name>:pr-bc131d25e6
  • 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-bc131d25e6
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-bc131d25e6
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-bc131d25e6
  • 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 shared functional tests...
⌛ Starting daprrp functional tests...
⌛ Starting datastoresrp functional tests...
⌛ Starting kubernetes functional tests...
⌛ Starting samples functional tests...
⌛ Starting msgrp functional tests...
✅ samples functional tests succeeded
✅ kubernetes functional tests succeeded
✅ ucp functional tests succeeded
✅ msgrp functional tests succeeded
✅ daprrp functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ shared functional tests succeeded

@@ -77,23 +78,29 @@ model EnvironmentProperties {
model RecipeConfigProperties {
@doc("Configuration for Terraform Recipes. Controls how Terraform plans and applies templates as part of Recipe deployment.")
terraform?: TerraformConfigProperties;

@doc("Environment variables injected during Terraform Recipe execution for the recipes in the environment.")
envVariables?: EnvironmentVariables;
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be env like the design doc. https://github.com/radius-project/design-notes/pull/39/files#diff-f9f52b8c3872a6c388dff224c472dfdd39bb011c139480ed60e7f4facd68aa10R183

We review API changes in detail because they are hard to change later. Please do a pass on on this and make sure that the API changes match the design doc.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this drifted from design doc after vishwahiremat#1 (comment) @lakshmimsft thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

If there is drift from an approved design doc, then it needs to come back to the design meeting. We review details like naming for clarity and consistency.

Copy link
Contributor

Choose a reason for hiding this comment

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

If there is drift from an approved design doc, then it needs to come back to the design meeting. We review details like naming for clarity and consistency.

Completely agree. This was a miss.

}

@doc("This secret is used within a recipe. Secrets are encrypted, often have fine-grained access control, auditing and are recommended to be used to hold sensitive data.")
model RecipeSecret {
Copy link
Contributor

Choose a reason for hiding this comment

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

The design doc calls this ProviderSecret.

Copy link
Contributor

@kachawla kachawla Feb 27, 2024

Choose a reason for hiding this comment

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

This was me here vishwahiremat#1 (comment). @rynowak if you think ProviderSecret makes more sense and we should add new properties for secrets for anything else that we might introduce in the future, then keeping it as ProviderSecret sounds good to me.

I think should have brought this up for a re-review of api spec design if it absolutely needed to change.

Copy link
Contributor

Choose a reason for hiding this comment

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

@lakshmimsft @ytimocin Let's re-review this and env in the design review today.

@youngbupark
Copy link

@ytimocin When you correct indentation on the multiple files, please file the separate PR.

Signed-off-by: ytimocin <ytimocin@microsoft.com>
@radius-functional-tests
Copy link

radius-functional-tests bot commented Feb 27, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository vishwahiremat/radius
Commit ref 1188d65
Unique ID 4512151054
Image tag pr-4512151054
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/functional/shared/recipes/<name>:pr-4512151054
  • 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-4512151054
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-4512151054
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-4512151054
  • 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 datastoresrp functional tests...
⌛ Starting kubernetes functional tests...
⌛ Starting ucp functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting shared functional tests...
⌛ Starting samples functional tests...
⌛ Starting daprrp functional tests...
✅ msgrp functional tests succeeded
✅ kubernetes functional tests succeeded
✅ ucp functional tests succeeded
✅ samples functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ daprrp functional tests succeeded
✅ shared functional tests succeeded

@ytimocin
Copy link
Contributor Author

PR will be closed but branch SHOULDN'T BE DELETED.

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.

6 participants