You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/03/13 14:46:02 UTC

[GitHub] mrutkows closed pull request #796: Resolves #795

mrutkows closed pull request #796: Resolves #795
URL: https://github.com/apache/incubator-openwhisk-wskdeploy/pull/796
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/deployers/servicedeployer.go b/deployers/servicedeployer.go
index 0ef55d8e..dfffb85d 100644
--- a/deployers/servicedeployer.go
+++ b/deployers/servicedeployer.go
@@ -20,12 +20,6 @@ package deployers
 import (
 	"bufio"
 	"fmt"
-	"github.com/apache/incubator-openwhisk-client-go/whisk"
-	"github.com/apache/incubator-openwhisk-wskdeploy/parsers"
-	"github.com/apache/incubator-openwhisk-wskdeploy/utils"
-	"github.com/apache/incubator-openwhisk-wskdeploy/wskderrors"
-	"github.com/apache/incubator-openwhisk-wskdeploy/wski18n"
-	"github.com/apache/incubator-openwhisk-wskdeploy/wskprint"
 	"net/http"
 	"os"
 	"path"
@@ -34,6 +28,13 @@ import (
 	"strings"
 	"sync"
 	"time"
+
+	"github.com/apache/incubator-openwhisk-client-go/whisk"
+	"github.com/apache/incubator-openwhisk-wskdeploy/parsers"
+	"github.com/apache/incubator-openwhisk-wskdeploy/utils"
+	"github.com/apache/incubator-openwhisk-wskdeploy/wskderrors"
+	"github.com/apache/incubator-openwhisk-wskdeploy/wski18n"
+	"github.com/apache/incubator-openwhisk-wskdeploy/wskprint"
 )
 
 const (
@@ -887,6 +888,14 @@ func (deployer *ServiceDeployer) createRule(rule *whisk.Rule) error {
 		return createWhiskClientError(err.(*whisk.WskError), response, parsers.YAML_KEY_RULE, true)
 	}
 
+	// Consecutive deployments of manifest containing trigger with feed action (and rule) result in inactive
+	// rule. The rule seems to become inactive when its trigger get deleted (part of the wskdeploy feed action update)
+	// Currently simply always setting rule status to active in case not specified implicitly
+	_, _, err = deployer.Client.Rules.SetState(rule.Name, "active")
+	if err != nil {
+		return err
+	}
+
 	displayPostprocessingInfo(parsers.YAML_KEY_RULE, rule.Name, true)
 	return nil
 }


 

----------------------------------------------------------------
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