You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When a stream is re-deployed (undeployed and then deployed again) some user provided properties are not retained exactly as they are entered by the user. An example is app.<name>.producer.partitionKeyExpression - which will be translated to app.<name>.spring.cloud.stream.bindings.output.producer.partitionKeyExpression.
This was noticed (#4896) as some logic will attempt to extract app properties using the original entered property names (prefixed with app.*).
Steps tp reproduce:
Navigate to SCDF UI
Add the Kafka OOTB apps
Create a stream definition using http | splitter | log
Deploy the stream - enter the following props in the "Freeform" prop editor tab:
Notice the app.splitter.producer.partitionKeyExpression property is now named app.splitter.spring.cloud.stream.bindings.output.producer.partitionKeyExpression.
⚠️ 💣 ⚠️ This is a problem because subsequent deploys will attempt to extract app properties but will not find this one.
To illustrate this problem, we will re-deploy the stream and scale the log sink instances down from 4 to 2.
As part of that flow, when the upstream app (splitter) is partitioned it should adjust the producer partition count to match.
Note that It is considered partitioned if it has the partitionKeyExpression property (extracted from the app.* props).
Steps
Undeploy the stream
Deploy the stream
Deploy the stream
Navigate to the "Freeform" props editor
You will see MANY properties from original
Edit the deployer.log.count=4 and set it to deployer.log.count=2
Click "Deploy"
View the retained props
Choose "Update Stream" from stream details page
Click the "Freeform" edit of the properties
💥 💥 Notice the app.splitter.spring.cloud.stream.bindings.output.producer.partitionCount=4 which should be 2 to match the log sink count.
To illustrate the expected behavior, we will manually enter the app.* property on the re-deploy and watch the partitionCount be modified as expected.
Steps:
Undeploy the stream
Deploy the stream
Navigate to the "Freeform" props editor
You will see MANY properties from original
Edit the deployer.log.count=2 and set it to deployer.log.count=1
Also enter app.splitter.producer.partitionKeyExpression=headers['payload']
Deploy the stream
View the retained props
Choose "Update Stream" from stream details page
Click the "Freeform" edit of the properties
🎉 🎉 Notice the app.splitter.spring.cloud.stream.bindings.output.producer.partitionCount=1 as expected - it was moved from 2 to 1 to match the log sink count.
Solution:
Either
the app.* props should be retained exactly as entered on subsequent deploys OR
the user should know they must re-enter the initial props they entered exactly as the 1st deploy (app.*) OR
the logic used to determine if the upstream app is partitioned should be smarter to look in other props besides the app.* props.
The text was updated successfully, but these errors were encountered:
Description
When a stream is re-deployed (undeployed and then deployed again) some user provided properties are not retained exactly as they are entered by the user. An example is
app.<name>.producer.partitionKeyExpression
- which will be translated toapp.<name>.spring.cloud.stream.bindings.output.producer.partitionKeyExpression
.This was noticed (#4896) as some logic will attempt to extract app properties using the original entered property names (prefixed with
app.*
).Steps tp reproduce:
http | splitter | log
app.splitter.producer.partitionKeyExpression
property is now namedapp.splitter.spring.cloud.stream.bindings.output.producer.partitionKeyExpression
.To illustrate this problem, we will re-deploy the stream and scale the log sink instances down from 4 to 2.
As part of that flow, when the upstream app (splitter) is partitioned it should adjust the producer partition count to match.
Note that It is considered partitioned if it has the
partitionKeyExpression
property (extracted from theapp.*
props).Steps
deployer.log.count=4
and set it todeployer.log.count=2
app.splitter.spring.cloud.stream.bindings.output.producer.partitionCount=4
which should be2
to match the log sink count.To illustrate the expected behavior, we will manually enter the
app.*
property on the re-deploy and watch thepartitionCount
be modified as expected.Steps:
deployer.log.count=2
and set it todeployer.log.count=1
app.splitter.producer.partitionKeyExpression=headers['payload']
app.splitter.spring.cloud.stream.bindings.output.producer.partitionCount=1
as expected - it was moved from 2 to 1 to match the log sink count.Solution:
Either
app.*
props should be retained exactly as entered on subsequent deploys ORapp.*
) ORapp.*
props.The text was updated successfully, but these errors were encountered: