SAMZA-2465: Task inputs information lost when enabled RegExTopicGenerator or specified 'task.inputs' explicitly in non-legacy application#1286
Conversation
When the user's non-legacy application enables 'RegExtopicGenerator' or specifies 'task.inputs' in the config file, the inputs information are specified in 'ApplicationDescriptor' will lost. Signed-off-by: Alan Zhang <shuai.xyz@gmail.com>
|
@bkonold can you take a look at this PR? |
|
It is my understanding that we override generated configs to allow for job deployment to be reconfigured without building a new binary of the job. This is useful, for example, when managing issues in production and a job needs to be quickly reconfigured; the job's configuration can be modified and the job redeployed with the same binary vs needing to touch the job's app descriptor and building a new version of the binary. For that reason it seems contradictory to merge values for the same key between original and generated config... A bit more generally begs the question of how we treat precedence between original config, rewritten config, and generated configs (from app descriptor). @kw2542 Since you are working on the deployment flow, can you comment on what the touch points are in the system currently for rewriting configs? Do we have a clear picture of what this precedence is now? |
|
".... input information from the application descriptor will be overrided by the information from RegExTopicGenerator or task.inputs...." |
+1; This PR negates - #1065 |
|
Clarify the issue here: If the user’s non-legacy application enabled |
Symptom
If the user’s non-legacy application enabled
RegExTopicGeneratoror specifiedtask.inputsexplicitly and specified the input streams in its application descriptor, the expectation from the user side should be that the application can consume messages from specified input streams and Kafka topics that matched specified regex patterns.However, in current logic seems the input information from the application descriptor will be overrided by the information from
RegExTopicGeneratorortask.inputsin the config file, which means the user’s application can only consume from matched Kafka topics or the inputs specified intask.inputs.Cause
The generated task inputs from the application descriptor are overrided by JobNodeConfigurationGenerator.mergeConfig function.
Changes
Merge generated inputs and original inputs before doing
JobNodeConfigurationGenerator.mergeConfigfunction call.Tests
API Changes
None
Upgrade Instructions
None
Usage Instructions
Noe