-
Notifications
You must be signed in to change notification settings - Fork 101
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
Conversation
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.
RuntimeConfiguration recipes.RuntimeConfiguration | ||
|
||
// RecipeOutput represents the output of executing a recipe (may be nil). | ||
RecipeOutput *recipes.RecipeOutput |
There was a problem hiding this comment.
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.
Test Results2 459 tests +1 2 452 ✔️ +1 1m 59s ⏱️ +3s 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.
|
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 { |
There was a problem hiding this comment.
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.
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.