Open csantanapr opened 6 years ago
One wrinkle here is that, for Message Hub triggers, the properties recorded in the DB can have different names than the properties specified when creating the trigger. For example, I specify my brokers using the kafka_brokers_sasl
property, but this gets recorded as brokers
in the DB.
I would argue that when retrieving the trigger details, the user should always see the property names the same as what they set when creating the trigger. This may mean massaging the property name back to what the user expects to see (e.g. brokers
-> kafka_brokers_sasl
)
Agree we should not expose the implementation details and keep the abstraction of the interface to the user the same so massaging the keys is a good thing.
@abaruni Could you change READ config object to match the input parameters by user based on feedback from @jberstler above ^^ https://github.com/apache/incubator-openwhisk-package-kafka/issues/220#issuecomment-343330248
I would argue that when retrieving the trigger details, the user should always see the property names the same as what they set when creating the trigger. This may mean massaging the property name back to what the user expects to see (e.g. brokers -> kafka_brokers_sasl)
cc @jasonpet
I did a quick look it looks like there are 2 fields to change username -> user brokers -> kafka_brokers_sasl
{
"kafka_brokers_sasl": [
"kafka01-prod01.messagehub.services.us-south.bluemix.net:9093",
"kafka02-prod01.messagehub.services.us-south.bluemix.net:9093",
"kafka03-prod01.messagehub.services.us-south.bluemix.net:9093",
"kafka04-prod01.messagehub.services.us-south.bluemix.net:9093",
"kafka05-prod01.messagehub.services.us-south.bluemix.net:9093"
],
"user": "admin"
}
@abaruni I will update description above, can you double check?
It's definitely user
here in produce action https://github.com/apache/incubator-openwhisk-package-kafka/blob/master/action/messageHubProduce.py#L124
It's definitely user
here in MessageHubFeedWeb Action https://github.com/apache/incubator-openwhisk-package-kafka/blob/master/action/messageHubFeedWeb.js#L145
But stored as username
in db, so we need the get to change to user
in the way out
https://github.com/apache/incubator-openwhisk-package-kafka/blob/master/action/messageHubFeedWeb.js#L84-L86
it is
kafka_brokers_sasl: triggerDoc.brokers,
user: triggerDoc.username,
it should be
brokers: triggerDoc.brokers,
username: triggerDoc.username,
Feed Management Enhancements for Kafka feed
This issue is an Epic to collect all the related tasks to implement the final solution for kafka
For some background on feeds and lifecycles refer to https://github.com/apache/incubator-openwhisk/blob/master/docs/feeds.md
This features are based on user feedback
Feature Requests
Lifecycle Events
Today this feed implements the lifecycle events
CREATE
andDETELETE
To implement the features requested above the this feed would need to implement the lifecycle eventsREAD
,UPDATE
READ lifecycle
The feed action should accept the parameter
lifecycleEvent
with the value ofREAD
.It should return the configuration and status for the trigger, for example:
Notes: The field
status.reason
not present whenstatus.active
istrue
The clients would be able to invoke the feed action with this
lifecycleEvent
For example using the CLI directly invoking the feed action.The go-CLI would be able to call the feed action automatically on a
trigger get
. For example:UPDATE lifecycle
The UPDATE lifecycle will allow users to update their feed without the need to delete and re-create their trigger. The feed action should accept the parameter
lifecycleEvent
with the value ofUPDATE
.The user should be able to pass a partial set of the configuration values, allowing them to update their trigger feed.
The feed will be paused while it's being updated. For example if user wants to update the topic name, it will invoke the feed action with the
topic
parameter for the existing trigger.For example invoking directly the feed action:
Using the cli using the integration embedded into the CLI