You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/08/29 01:57:24 UTC

[GitHub] daisy-ycguo commented on issue #396: Deploy sequences separately other than combining with actions

daisy-ycguo commented on issue #396: Deploy sequences separately other than combining with actions
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/396#issuecomment-325531936
 
 
   @pritidesai Thank you for reviewing.
   I understsand sequence is a kind of action by design. 
   
   But, method `ManifestReader.SetActions` will add actions to `reader.serviceDeployer.Deployment.Packages.Action`, and method `ManifestReader.SetSequences` will invoke  `SetActions`, which will add actions (which is sequence instead) to `reader.serviceDeployer.Deployment.Packages.Action`. So you will see `process-change-cloudant-sequence` is treated same as `process-change` ( refer to below output of wskdeploy ). All `actions` and `sequences` are saved in a list, which will cause a random deploy sequence of `actions` and `sequences`, and will result issue #391 .
   ```
   Packages:
   Name: cloudant-trigger
       bindings: 
     * dependency: openwhisk-cloudant
       location: /whisk.system/cloudant
   
     * action: process-change
       bindings: 
       annotations: 
     * action: process-change-cloudant-sequence
       bindings: 
       annotations: 
   
   
   Triggers:
   * trigger: data-inserted-trigger
       bindings: 
           - dbname : ""
       annotations: 
           - name: feed value: openwhisk-cloudant/changes
   
    Rules
   * rule: log-change-rule
       - trigger: data-inserted-trigger
       - action: cloudant-trigger/process-change-cloudant-sequence
   
   Do you really want to deploy this? (y/N): 
   ```
   
   My PR has updated method `ManifestReader.SetSequences` to add actions (which is sequence instead) to `reader.serviceDeployer.Deployment.Packages.Sequence`. After applying my PR, the output help message of wskdeploy will look like below:
   ```
   Packages:
   Name: cloudant-trigger
       bindings: 
     * dependency: openwhisk-cloudant
       location: /whisk.system/cloudant
   
     * action: process-change
       bindings: 
       annotations: 
   
     * sequence: process-change-cloudant-sequence
   
   Triggers:
   * trigger: data-inserted-trigger
       bindings: 
           - dbname : ""
       annotations: 
           - name: feed value: openwhisk-cloudant/changes
   
    Rules
   * rule: log-change-rule
       - trigger: data-inserted-trigger
       - action: cloudant-trigger/process-change-cloudant-sequence
   ```
   
   The deploying sequences will be executed after deploying actions. And all wsk client invocations are synchronized. Then sequences will be created after actions. The issue will be fixed.
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services