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

Provide RuntimeConfiguration to processor #5505

Merged
merged 1 commit into from
May 1, 2023
Merged

Conversation

rynowak
Copy link
Contributor

@rynowak rynowak commented May 1, 2023

Description

This change adds the RuntimeConfiguration to the set of data provided to a processor. This was a gap we identified while working on Dapr state store support. Since the Dapr state store processor needs to create Kubernetes resources, it needs to know the runtime configuration to get the correct namespace.

This change adds the infrastructure needed to get this data, and updates the unit tests of the controller + existing redis processor. The Dapr state store processor will land in a follow up PR, as several changes need to go in first.

This change adds the RuntimeConfiguration to the set of data provided to a processor. This was a gap we identified while working on Dapr state store support. Since the Dapr state store processor needs to create Kubernetes resources, it needs to know the runtime configuration to get the correct namespace.

This change adds the infrastructure needed to get this data, and updates the unit tests of the controller + existing redis processor. The Dapr state store processor will land in a follow up PR, as several changes need to go in first.
@rynowak rynowak requested a review from a team as a code owner May 1, 2023 18:29
RuntimeConfiguration recipes.RuntimeConfiguration

// RecipeOutput represents the output of executing a recipe (may be nil).
RecipeOutput *recipes.RecipeOutput
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Defining an options type so we don't have to keep making breaking changes to this API as we add more capabilities.

@github-actions
Copy link

github-actions bot commented May 1, 2023

Test Results

2 459 tests  +1   2 452 ✔️ +1   1m 59s ⏱️ +3s
   229 suites ±0          7 💤 ±0 
       1 files   ±0          0 ±0 

Results for commit ee0c07b. ± Comparison against base commit 42a281c.

This pull request removes 2 and adds 3 tests. Note that renamed tests count towards both.
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/2b14ee24-fcb5-4db0-8400-39e94ca30378
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/2b14ee24-fcb5-4db0-8400-39e94ca30378#01
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/19fc3421-0378-4e2b-9b9d-33d533df936e
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/19fc3421-0378-4e2b-9b9d-33d533df936e#01
github.com/project-radius/radius/pkg/linkrp/backend/controller ‑ TestCreateOrUpdateResource_Run/runtime-configuration-err

@github-actions
Copy link

github-actions bot commented May 1, 2023

61.8

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

The coverage result does not include the functional test coverage.

eng.EXPECT().
Execute(gomock.Any(), recipeMetadata).
Return(&recipes.RecipeOutput{}, nil).
Times(1)
}

if tt.getErr == nil && !tt.conversionFailure && tt.recipeErr == nil && tt.processorErr == nil && tt.resourceClientErr != nil {
if stillPassing && tt.runtimeConfigurationErr != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to simplify all of these checks, it was getting kinda ridiculous.

pkg/linkrp/processors/types.go Show resolved Hide resolved
@rynowak rynowak merged commit 22877cd into main May 1, 2023
@rynowak rynowak deleted the rynowak/processor-namespace branch May 1, 2023 19:33
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.

3 participants