Is it possible to switch a cadence-worfklow cluster to advanced visibliity (ElasticSearch) without downtime? - cadence-workflow

We have a cadence-workflow cluster with the visibility store on Cassandra. This does not support advanced visibility features, so we would like to move to ElasticSearch. However the cluster is in active production use, so we would like to make the switch without downtime. To clarify "without downtime":
Running workflows can complete once we start the switchover.
New workflows can be started while the switchover is in progress.
The basic visibility features are available both for workflows started before the switch, and for those started during the switchover. This is important both for debugging / troubleshooting purposes, and because for some of our code we uses the getResult calls (Java client) which I believe uses the visibility features on the server side.
Is this possible?

Yes, it's supported in Cadence. Below is the steps that you can use as references.
1. Configure advanced visibility
Follow the instructions to setup visibility dependency and configuration
Keep the basic visibility dependency
Before enabling visibility, set the AdvancedVisibilityWritingMode dynamic config to do dual writing onto both advanced visibility(ES based) and basic visibility(db based), and only read from basic visibility for now:
system.advancedVisibilityWritingMode:
- value: "dual"
system.enableReadVisibilityFromES:
- value: false
So that Cadence will write visibility to both stores, but continue to use basic visibility for read
Deploy the config
2. Switching to advanced visibility
You don't want to switch right away because the new store doesn't have enough data yet. Depends on the domain retention, or use case scenarios, you may switch to use read from advanced visibility later some time when you think it's okay to read only from advanced visibility.
system.advancedVisibilityWritingMode:
- value: "dual"
system.enableReadVisibilityFromES:
- value: false
- value: true
constraints:
domainName: "samples-domain-A"
- value: false
constraints:
domainName: "samples-domain-B"
This will let samples-domain-A and samples-domain-B to read from advanced visibility, and the rest continue to use basic visibility
When you are confident that every domain is okay to use advanced visibility.
system.advancedVisibilityWritingMode:
- value: "dual"
system.enableReadVisibilityFromES:
- value: true
3. Deprecate basic visibility
When the previous steps are successful, you can deprecate the basic visibility.
You can remove the db based visibility from config, and remove the dynamic config that used in above(when only advanced visibility is configured, Cadence will only write to and read from advanced visibility by default)

Related

How do I use TODO progress tracking to track based on state instead of default

I'm using org-mode to create a tracking system for completion of a game(Warframe). I created custom states based on the org mode guide on 5.2 Multi-state workflows as follows.
#+TODO: TODO(t) | DONE(d)
#+TODO: NEED(n) BUILT(b) | MASTERED(m)
The current way it currently tracks is the default DONE/TOTAL. I'm looking for it to look like MASTED(BUILT)/TOTAL. The Custom tracking is not mentioned anywhere in the guide that I can find.
example of how it is tracked
*** Excalibur [0/2]
**** BUILT Regular
**** NEED Prime
example of how i would like it tracked
*** Excalibur [0(1)/2]
**** BUILT Regular
**** NEED Prime
Rephrased Question:
org mode has tracking cookies that only track Completed tasks vs total. Im looking to add a intermediate state that can also be tracked to show how many items are being worked on as well. I basicly want the tracking cookie to go from DONE/TOTAL to DONE(INTERMEDIATE)/TOTAL or in the case of above MASTERED/TOTAL to MASTERED(BUILT)/TOTAL
Kept original phrasing in hopes it would help explain what I'm looking for for an end result.

IBM Watson Assistant: How to set a 'jump to' target node dynamically (i.e. using context variables)

I want to jump from a dialog node to a node the ID of which is stored in a context variable.
I'm trying to solve a problem that has to do with a digression and which has been described here:
Conditionally return from digression in watson assistant
Especially this chart visualizes the problem:
In my opinion, A.H. posed a very reasonable and relevant question that has got no viable answer.
As far as I can see the problem can not be solved by digression settings. Either the root level node (triggered by matching the intent # Want_to_speak_to_someone) is set to 'return after digression' or it is not.
If the digression setting of this digression node is set to 'return' it will always return - no matter what happens further down in the dialog flow of this digression. Even if the user confirms that he wants to speak to a person (i.e. he does not want to return) the dialog will return to the node where the digression started.
This even happens when I jump from the yes-node (user confirms that he wants to speak to a person) out to any other node. As soon as the branch (or the branch the user jumped to) ends the dialog returns to the node where digression started.
If the digression setting of this digression node is set to 'does not return' however, a return is not possible - even if the user decides against speaking to a person and opts for returning to where he was.
What A.H. and I want is that the user can digress from a dialog flow and can still decide whether he wants to return or not. I think this is a pretty natural and important feature of a dialog. People like to reverse their decision or maybe they even digressed unintentionally from the given dialog flow.
Akaykay proposed to have two different nodes - a 'yes-node' which allows returning and a 'no-node' that does not allow returning. But this doesn't work, because before that I must have another node that asks the user for confirmation - and this 'confirmation-node' has to be set either to 'return' or 'does not return' (yielding the problems described above).
For this reason, I tried to figure out a workaround: I store the dialog node ID from which the dialog digresses in a context variable.
It is a context variable
"context": {
"last_node": "<? output.nodes_visited [0]?>",
...
},
which gets updated in every node of a dialog flow which allows digression.
In the example I could then jump back to the $last_node if the user wants to return and I could jump to another (fixed) node if the user wants to speak to a person - digressions settings of the 'digression node' would not interfere and could be set to 'does not return'.
Then I tried to edit the respective node (from which to return to the $last_node) in the json file of my skill:
"next_step": {
"behavior": "jump_to",
"selector": "user_input",
"dialog_node": "$last_node"
},
But when I reimport the skill-json-file again I get this error message:
I would be fine with either solution - one that uses digression settings or one that allows setting the 'jump to' target node dynamically. I deeply appriciate any help - thanks!
If you want to prevent Watson Assistent from returning from digression just call <? clearDialogStack() ?> function in the node where you don't want Watson Assistant to return from digression and that's it.
In your chart you would write "Ok, click here. <?clearDialogStack()?>" in the output text of the node "Ok, click here." and that should do the trick.
Here it is in the doc in this section: https://cloud.ibm.com/docs/services/assistant?topic=assistant-dialog-runtime#dialog-runtime-digressions
Also note that currently it is not possible to create dynamic gotos with Watson Assistant. Only thing you can do is to create a dialog node with all the needed gotos conditioned by something underneath it and then you would goto this node. It is hard to create this manually but it can be generated automatically. For more magic with WA check out this project:
https://github.com/IBM/watson-assistant-workbench
It is possible to develop chatbots with WA completely without UI.

Can't Change Metric Alias in Grafana Using a Zabbix Plugin

I want to show multiple CPU Usage from different hosts in one graph but they all end up with the same name and I can't tell which line represents which host:
here's the snapshot.
I'm using Grafana 5.2.4 with a Zabbix plugin 3.9.1. My Zabbix version is 3.0.12.
I've tried overriding legends in Grafana but there's no such option. Also, Zabbix plugin doesn't allow connecting directly to DB, so I can't use the ALIAS BY option either. I've tried using macros in Zabbix to include host name in item name, but {HOST.NAME} just ends up as is in the item name (and not replaced by the actual values).
Any solutions will be hugely appreciated.
You should use the templating feature of the Zabbix Grafana plugin,see the attached screens and the following description for a working example.
I have a Routers Zabbix Hostgroup, so I define a Router Grafana variable to match the hosts (Routers.*), see the first screenshot.
Enable both multi-value and Select All
Then in the metrics configuration use a single metric configured this way:
Group: Routers
Host: $Router (mind the $, the variable will be expanded in real time accordingly to the selection)
Item: the common item name (i.e.: ICMP Response Time)
And you will get something similar to the second screenshot, with a host picker on top and multiple selections.
So There's a "Functions" button below each metric when we are configuring and editing our graph. There's an "Alias" option and when you hover over it you see more options. If you click on "setAlias", you can define an alias for each metric.
Since this solution requires setting each alias individually, I recommend the solution that was suggested by Simone Zabberoni above. but this one is also worth knowing since it might come in handy at times.

Can I enable / Disable an Azure Service Bus Topic using Powershell

I have spent a couple of hours search for a solution to disable my Azure Service Bus Topics using Powershell.
The background for this is we want to force a manual failover to our other region.
Obviously I could click in the Portal:
but I want to have a script to do this.
Here is my current attempt:
Any help would be great.
Assuming you're sure your $topic contains the full description, modify the status parameter in the array and then splat it back using the UpdateTopic method. I'm afraid I can't test this at present.
$topic.Status = "Disabled"
$topicdesc = $NamespaceManager.UpdateTopic($topic)
I don't think you'll need to set the entity type for the Status, nor do you require semi-colons after each line of code in your loop.
References
PowerShell Service Bus creation sample script (which this appears to be based off): https://blogs.msdn.microsoft.com/paolos/2014/12/02/how-to-create-service-bus-queues-topics-and-subscriptions-using-a-powershell-script/
UpdateTopic method: https://msdn.microsoft.com/en-us/library/azure/microsoft.servicebus.namespacemanager.updatetopic.aspx
Additional note: please don't screenshot the code - paste it in. I'd rather copy-and-paste than type things out.

Since User Info & Address were used at the time of Signing Up & Updating Profile, so How to design GWT Gui to reuse the components & action?

Ok, Here is the problem.
At the time user signup, user need to provide info such as:
-Email:______________ -UserName:____________
-FName:______________ -LName:_______________
-Address:____________ (User can have option to update Address lately)
....
-Captcha:__________
[Sign Up] [Reset]
Now suppose that user already got an account & they want to modify their info, then the Gui Could be 40% similar to the the above one.
-FName:______________ -LName:_______________ [Update Name]
-Address:____________ [Update Address]
....
My question is how to design GWT Gui in such a way that we can reuse the Gui components and the Action in both situations?
Maybe put all GUI into 1 page & have 2 different params: 1 for handling Signing Up Ex: #profile;actionParam="signup", & the other for Updating Profile Ex:#profile;actionParam="modify".
We can also use PresenterWidget but I think PresenterWidget is for using the exact same code everywhere, but in my case the Gui need to be modified a bit.
In Java we can do like Parent and Child Inheritance, but I am not sure if we an do similar things like that in GWT?
Can u find a better solution?
You can use the exact same view (widget) and simply hide some fields based on your criteria. You can also group these extra components in one container, so you can hide/show them with a single call:
.newUserPanel.setVisible(user == new);
You can extends widgets in GWT - all of the "standard" widgets extend and implement something - but in this use case the benefits are probably too small to justify two separate views/widgets. But it's possible if you decide to go this route.